Class SmartInventory
java.lang.Object
net.minecraftforge.items.wrapper.RecipeWrapper
com.simibubi.create.foundation.item.SmartInventory
- All Implemented Interfaces:
net.minecraft.world.Clearable,net.minecraft.world.Container,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>,net.minecraftforge.items.IItemHandler,net.minecraftforge.items.IItemHandlerModifiable
- Direct Known Subclasses:
BasinInventory,MechanicalCrafterTileEntity.Inventory
public class SmartInventory
extends net.minecraftforge.items.wrapper.RecipeWrapper
implements net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanprotected intprotected com.simibubi.create.foundation.item.SmartInventory.SyncedStackHandlerFields inherited from class net.minecraftforge.items.wrapper.RecipeWrapper
invFields inherited from interface net.minecraft.world.Container
LARGE_MAX_STACK_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionSmartInventory(int slots, SyncedTileEntity te) SmartInventory(int slots, SyncedTileEntity te, int stackSize, boolean stackNonStackables) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserializeNBT(net.minecraft.nbt.CompoundTag nbt) net.minecraft.world.item.ItemStackextractItem(int slot, int amount, boolean simulate) net.minecraft.world.item.ItemStackgetItem(int slot) intgetSlotLimit(int slot) intgetSlots()default net.minecraft.world.item.ItemStackgetStackInSlot(int slot) net.minecraft.world.item.ItemStackgetStackInSlotIntermediate(int slot) intgetStackLimit(int slot, net.minecraft.world.item.ItemStack stack) net.minecraft.world.item.ItemStackinsertItem(int slot, net.minecraft.world.item.ItemStack stack, boolean simulate) booleanisItemValid(int slot, net.minecraft.world.item.ItemStack stack) net.minecraft.nbt.CompoundTagvoidsetStackInSlot(int slot, net.minecraft.world.item.ItemStack stack) whenContentsChanged(Consumer<Integer> updateCallback) withMaxStackSize(int maxStackSize) Methods inherited from class net.minecraftforge.items.wrapper.RecipeWrapper
canPlaceItem, clearContent, getContainerSize, getMaxStackSize, isEmpty, removeItem, removeItemNoUpdate, setChanged, setItem, startOpen, stillValid, stopOpenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.Container
countItem, hasAnyOf
-
Field Details
-
extractionAllowed
protected boolean extractionAllowed -
insertionAllowed
protected boolean insertionAllowed -
stackNonStackables
protected boolean stackNonStackables -
wrapped
protected com.simibubi.create.foundation.item.SmartInventory.SyncedStackHandler wrapped -
stackSize
protected int stackSize
-
-
Constructor Details
-
SmartInventory
-
SmartInventory
-
-
Method Details
-
withMaxStackSize
-
whenContentsChanged
-
allowInsertion
-
allowExtraction
-
forbidInsertion
-
forbidExtraction
-
getSlots
public int getSlots()- Specified by:
getSlotsin interfacenet.minecraftforge.items.IItemHandler
-
insertItem
public net.minecraft.world.item.ItemStack insertItem(int slot, net.minecraft.world.item.ItemStack stack, boolean simulate) - Specified by:
insertItemin interfacenet.minecraftforge.items.IItemHandler
-
extractItem
public net.minecraft.world.item.ItemStack extractItem(int slot, int amount, boolean simulate) - Specified by:
extractItemin interfacenet.minecraftforge.items.IItemHandler
-
getSlotLimit
public int getSlotLimit(int slot) - Specified by:
getSlotLimitin interfacenet.minecraftforge.items.IItemHandler
-
isItemValid
public boolean isItemValid(int slot, net.minecraft.world.item.ItemStack stack) - Specified by:
isItemValidin interfacenet.minecraftforge.items.IItemHandler
-
setStackInSlot
public void setStackInSlot(int slot, net.minecraft.world.item.ItemStack stack) - Specified by:
setStackInSlotin interfacenet.minecraftforge.items.IItemHandlerModifiable
-
getItem
public net.minecraft.world.item.ItemStack getItem(int slot) - Specified by:
getItemin interfacenet.minecraft.world.Container- Overrides:
getItemin classnet.minecraftforge.items.wrapper.RecipeWrapper
-
getStackLimit
public int getStackLimit(int slot, @Nonnull net.minecraft.world.item.ItemStack stack) -
serializeNBT
public net.minecraft.nbt.CompoundTag serializeNBT()- Specified by:
serializeNBTin interfacenet.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
-
deserializeNBT
public void deserializeNBT(net.minecraft.nbt.CompoundTag nbt) - Specified by:
deserializeNBTin interfacenet.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
-
getStackInSlotIntermediate
public net.minecraft.world.item.ItemStack getStackInSlotIntermediate(int slot) -
getStackInSlot
default net.minecraft.world.item.ItemStack getStackInSlot(int slot) - Specified by:
getStackInSlotin interfacenet.minecraftforge.items.IItemHandler
-