public interface ISidedInventoryProvider extends IInventoryProvider.IDirectInventoryProvider, net.minecraft.inventory.ISidedInventory
IInventoryProvider.IDeferredInventoryProvider<T>, IInventoryProvider.IDirectInventoryProvider| Modifier and Type | Method and Description |
|---|---|
default boolean |
canExtractItem(int slotNumber,
net.minecraft.item.ItemStack itemStack,
net.minecraft.util.EnumFacing side)
Checks whether you can extract the
ItemStack in the slot associated to the global number. |
default boolean |
canInsertItem(int slotNumber,
net.minecraft.item.ItemStack itemStack,
net.minecraft.util.EnumFacing side)
Checks whether you can insert the
ItemStack in the slot associated to the global number. |
default int |
convertSlotNumber(int slotNumber)
Converts a global slot number to its actual number in a
MalisisInventory. |
default net.minecraft.item.ItemStack |
decrStackSize(int slotNumber,
int count)
Removes from an slot up to a specified count of items and returns them in a new stack.
|
default MalisisInventory[] |
getInventories()
Gets all the
inventories accessible from all the side of this IInventoryProvider. |
default MalisisInventory[] |
getInventories(net.minecraft.util.EnumFacing side)
Gets all the
inventories accessible from the side of this IInventoryProvider. |
MalisisInventory |
getInventory(net.minecraft.util.EnumFacing side)
Gets the
MalisisInventory accessible from the side of this IInventoryProvider. |
default MalisisInventory |
getInventory(int slotNumber)
Gets the
MalisisInventory associated with a global slot number. |
default net.minecraft.util.EnumFacing |
getRealSide(net.minecraft.util.EnumFacing side)
Gets the actual side wanted based on the direction of the block in the world.
|
default int[] |
getSlotsForFace(net.minecraft.util.EnumFacing side)
Gets the global numbers for the slots for accessible from a side in this
IInventoryProvider. |
default net.minecraft.item.ItemStack |
getStackInSlot(int slotNumber)
Gets the
ItemStack is the slot |
default boolean |
isItemValidForSlot(int slotNumber,
net.minecraft.item.ItemStack itemStack)
Returns true if the
ItemStack can be contained in the slot. |
default boolean |
isSlotInSide(int slotNumber,
net.minecraft.util.EnumFacing side)
Checks if is slot is available from the
side. |
default void |
setInventorySlotContents(int slotNumber,
net.minecraft.item.ItemStack stack)
Sets the given item stack to the specified slot in the inventory
|
breakInventories, clear, closeInventory, getDisplayName, getField, getFieldCount, getGui, getInventory, getInventoryStackLimit, getName, getSizeInventory, hasCustomName, isUseableByPlayer, markDirty, openInventory, removeStackFromSlot, setFieldMalisisInventory getInventory(net.minecraft.util.EnumFacing side)
side - the sidedefault MalisisInventory[] getInventories(net.minecraft.util.EnumFacing side)
inventories accessible from the side of this IInventoryProvider.side - the sidedefault MalisisInventory[] getInventories()
inventories accessible from all the side of this IInventoryProvider.getInventories in interface IInventoryProvider.IDirectInventoryProviderdefault net.minecraft.util.EnumFacing getRealSide(net.minecraft.util.EnumFacing side)
TileEntity.side - the sidedefault int convertSlotNumber(int slotNumber)
MalisisInventory.slotNumber - the slot numberdefault boolean isSlotInSide(int slotNumber,
net.minecraft.util.EnumFacing side)
side.slotNumber - the slot numberside - the sidedefault MalisisInventory getInventory(int slotNumber)
MalisisInventory associated with a global slot number.slotNumber - the slot numberdefault net.minecraft.item.ItemStack getStackInSlot(int slotNumber)
IInventoryProvider.IDirectInventoryProviderItemStack is the slotgetStackInSlot in interface net.minecraft.inventory.IInventorygetStackInSlot in interface IInventoryProvider.IDirectInventoryProviderslotNumber - the indexdefault net.minecraft.item.ItemStack decrStackSize(int slotNumber,
int count)
IInventoryProvider.IDirectInventoryProviderdecrStackSize in interface net.minecraft.inventory.IInventorydecrStackSize in interface IInventoryProvider.IDirectInventoryProviderslotNumber - the indexcount - the countdefault void setInventorySlotContents(int slotNumber,
net.minecraft.item.ItemStack stack)
IInventoryProvider.IDirectInventoryProvidersetInventorySlotContents in interface net.minecraft.inventory.IInventorysetInventorySlotContents in interface IInventoryProvider.IDirectInventoryProviderslotNumber - the indexstack - the stackdefault boolean isItemValidForSlot(int slotNumber,
net.minecraft.item.ItemStack itemStack)
IInventoryProvider.IDirectInventoryProviderItemStack can be contained in the slot.isItemValidForSlot in interface net.minecraft.inventory.IInventoryisItemValidForSlot in interface IInventoryProvider.IDirectInventoryProviderslotNumber - the indexitemStack - the stackdefault int[] getSlotsForFace(net.minecraft.util.EnumFacing side)
IInventoryProvider.getSlotsForFace in interface net.minecraft.inventory.ISidedInventoryside - the sidedefault boolean canInsertItem(int slotNumber,
net.minecraft.item.ItemStack itemStack,
net.minecraft.util.EnumFacing side)
ItemStack in the slot associated to the global number.canInsertItem in interface net.minecraft.inventory.ISidedInventoryslotNumber - the slot numberitemStack - the item stackside - the sidedefault boolean canExtractItem(int slotNumber,
net.minecraft.item.ItemStack itemStack,
net.minecraft.util.EnumFacing side)
ItemStack in the slot associated to the global number.canExtractItem in interface net.minecraft.inventory.ISidedInventoryslotNumber - the slot numberitemStack - the item stackside - the side