public class InventoryMapper
extends java.lang.Object
implements net.minecraft.inventory.IInventory
| Constructor and Description |
|---|
InventoryMapper(net.minecraft.inventory.IInventory inv,
int start,
int size)
Creates a new InventoryMapper
|
InventoryMapper(net.minecraft.inventory.IInventory inv,
int start,
int size,
boolean checkItems) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeInventory() |
net.minecraft.item.ItemStack |
decrStackSize(int slot,
int amount) |
net.minecraft.inventory.IInventory |
getBaseInventory() |
java.lang.String |
getInventoryName() |
int |
getInventoryStackLimit() |
int |
getSizeInventory() |
net.minecraft.item.ItemStack |
getStackInSlot(int slot) |
net.minecraft.item.ItemStack |
getStackInSlotOnClosing(int slot) |
boolean |
hasCustomInventoryName() |
boolean |
isItemValidForSlot(int slot,
net.minecraft.item.ItemStack stack) |
boolean |
isUseableByPlayer(net.minecraft.entity.player.EntityPlayer entityplayer) |
void |
markDirty() |
void |
openInventory() |
void |
setInventorySlotContents(int slot,
net.minecraft.item.ItemStack itemstack) |
void |
setStackSizeLimit(int limit) |
public InventoryMapper(net.minecraft.inventory.IInventory inv,
int start,
int size)
inv - The backing inventorystart - The starting indexsize - The size of the new inventory, take care not to exceed the
end of the backing inventorypublic InventoryMapper(net.minecraft.inventory.IInventory inv,
int start,
int size,
boolean checkItems)
public net.minecraft.inventory.IInventory getBaseInventory()
public int getSizeInventory()
getSizeInventory in interface net.minecraft.inventory.IInventorypublic net.minecraft.item.ItemStack getStackInSlot(int slot)
getStackInSlot in interface net.minecraft.inventory.IInventorypublic net.minecraft.item.ItemStack decrStackSize(int slot,
int amount)
decrStackSize in interface net.minecraft.inventory.IInventorypublic void setInventorySlotContents(int slot,
net.minecraft.item.ItemStack itemstack)
setInventorySlotContents in interface net.minecraft.inventory.IInventorypublic java.lang.String getInventoryName()
getInventoryName in interface net.minecraft.inventory.IInventorypublic void setStackSizeLimit(int limit)
public int getInventoryStackLimit()
getInventoryStackLimit in interface net.minecraft.inventory.IInventorypublic boolean isUseableByPlayer(net.minecraft.entity.player.EntityPlayer entityplayer)
isUseableByPlayer in interface net.minecraft.inventory.IInventorypublic void openInventory()
openInventory in interface net.minecraft.inventory.IInventorypublic void closeInventory()
closeInventory in interface net.minecraft.inventory.IInventorypublic net.minecraft.item.ItemStack getStackInSlotOnClosing(int slot)
getStackInSlotOnClosing in interface net.minecraft.inventory.IInventorypublic boolean isItemValidForSlot(int slot,
net.minecraft.item.ItemStack stack)
isItemValidForSlot in interface net.minecraft.inventory.IInventorypublic boolean hasCustomInventoryName()
hasCustomInventoryName in interface net.minecraft.inventory.IInventorypublic void markDirty()
markDirty in interface net.minecraft.inventory.IInventory