public static interface IInventoryProvider.IDirectInventoryProvider extends IInventoryProvider, net.minecraft.inventory.IInventory
IInventoryProvider.IDeferredInventoryProvider<T>, IInventoryProvider.IDirectInventoryProvider| Modifier and Type | Method and Description |
|---|---|
default void |
breakInventories(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
Break all the inventories of this
IInventoryProvider. |
default void |
clear()
Empties all the inventories of this
IInventoryProvider |
default void |
closeInventory(net.minecraft.entity.player.EntityPlayer player)
Closes inventory.
|
default net.minecraft.item.ItemStack |
decrStackSize(int index,
int count)
Removes from an slot up to a specified count of items and returns them in a new stack.
|
default net.minecraft.util.text.ITextComponent |
getDisplayName() |
default int |
getField(int id) |
default int |
getFieldCount() |
MalisisGui |
getGui(MalisisInventoryContainer container)
Gets the
MalisisGui associated with the MalisisInventory. |
default MalisisInventory[] |
getInventories()
Gets all the
inventories for this IInventoryProvider. |
MalisisInventory |
getInventory()
Gets the default inventory for this provider.
|
default int |
getInventoryStackLimit()
Returns the maximum stack size for a inventory slot.
|
default java.lang.String |
getName() |
default int |
getSizeInventory()
Gets the number of slots in the default inventory (first one).
|
default net.minecraft.item.ItemStack |
getStackInSlot(int index)
Gets the
ItemStack is the slot |
default boolean |
hasCustomName() |
default boolean |
isItemValidForSlot(int index,
net.minecraft.item.ItemStack stack)
Returns true if the
ItemStack can be contained in the slot. |
default boolean |
isUseableByPlayer(net.minecraft.entity.player.EntityPlayer player)
Do not give this method the name canInteractWith because it clashes with Container.
|
default void |
markDirty()
For tile entities, ensures the chunk containing the tile entity is saved to disk later - the game won't think it hasn't changed
and skip it.
|
default void |
openInventory(net.minecraft.entity.player.EntityPlayer player)
Opens inventory.
|
default net.minecraft.item.ItemStack |
removeStackFromSlot(int index)
When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem - like when you close
a workbench GUI.
|
default void |
setField(int id,
int value) |
default void |
setInventorySlotContents(int index,
net.minecraft.item.ItemStack stack)
Sets the given item stack to the specified slot in the inventory
|
MalisisInventory getInventory()
IInventory interactions, or if you know that the provider only contains one
inventory.default MalisisInventory[] getInventories()
inventories for this IInventoryProvider.MalisisGui getGui(MalisisInventoryContainer container)
MalisisGui associated with the MalisisInventory.container - the containerdefault void clear()
IInventoryProviderclear in interface net.minecraft.inventory.IInventorydefault void breakInventories(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
IInventoryProvider.world - the worldpos - the posdefault boolean hasCustomName()
hasCustomName in interface net.minecraft.world.IWorldNameabledefault java.lang.String getName()
getName in interface net.minecraft.world.IWorldNameabledefault net.minecraft.util.text.ITextComponent getDisplayName()
getDisplayName in interface net.minecraft.world.IWorldNameabledefault int getSizeInventory()
getSizeInventory in interface net.minecraft.inventory.IInventorydefault net.minecraft.item.ItemStack getStackInSlot(int index)
ItemStack is the slotgetStackInSlot in interface net.minecraft.inventory.IInventoryindex - the indexdefault net.minecraft.item.ItemStack decrStackSize(int index,
int count)
decrStackSize in interface net.minecraft.inventory.IInventoryindex - the indexcount - the countdefault net.minecraft.item.ItemStack removeStackFromSlot(int index)
removeStackFromSlot in interface net.minecraft.inventory.IInventoryindex - the indexdefault void setInventorySlotContents(int index,
net.minecraft.item.ItemStack stack)
setInventorySlotContents in interface net.minecraft.inventory.IInventoryindex - the indexstack - the stackdefault int getInventoryStackLimit()
getInventoryStackLimit in interface net.minecraft.inventory.IInventorydefault void markDirty()
markDirty in interface net.minecraft.inventory.IInventorydefault boolean isUseableByPlayer(net.minecraft.entity.player.EntityPlayer player)
isUseableByPlayer in interface net.minecraft.inventory.IInventoryplayer - the playerdefault void openInventory(net.minecraft.entity.player.EntityPlayer player)
openInventory in interface net.minecraft.inventory.IInventoryplayer - the playerdefault void closeInventory(net.minecraft.entity.player.EntityPlayer player)
closeInventory in interface net.minecraft.inventory.IInventoryplayer - the playerdefault boolean isItemValidForSlot(int index,
net.minecraft.item.ItemStack stack)
ItemStack can be contained in the slot.isItemValidForSlot in interface net.minecraft.inventory.IInventoryindex - the indexstack - the stackdefault int getField(int id)
getField in interface net.minecraft.inventory.IInventorydefault void setField(int id,
int value)
setField in interface net.minecraft.inventory.IInventorydefault int getFieldCount()
getFieldCount in interface net.minecraft.inventory.IInventory