public class SmartInventory
extends net.minecraftforge.items.wrapper.RecipeWrapper
implements net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundNBT>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
extractionAllowed |
protected boolean |
insertionAllowed |
protected boolean |
stackNonStackables |
protected int |
stackSize |
protected com.simibubi.create.foundation.item.SmartInventory.SyncedStackHandler |
wrapped |
| Constructor and Description |
|---|
SmartInventory(int slots,
SyncedTileEntity te) |
SmartInventory(int slots,
SyncedTileEntity te,
int stackSize,
boolean stackNonStackables) |
| Modifier and Type | Method and Description |
|---|---|
SmartInventory |
allowExtraction() |
SmartInventory |
allowInsertion() |
void |
deserializeNBT(net.minecraft.nbt.CompoundNBT nbt) |
net.minecraft.item.ItemStack |
extractItem(int slot,
int amount,
boolean simulate) |
SmartInventory |
forbidExtraction() |
SmartInventory |
forbidInsertion() |
net.minecraft.item.ItemStack |
getItem(int slot) |
int |
getSlotLimit(int slot) |
int |
getSlots() |
default net.minecraft.item.ItemStack |
getStackInSlot(int slot) |
net.minecraft.item.ItemStack |
getStackInSlotIntermediate(int slot) |
int |
getStackLimit(int slot,
net.minecraft.item.ItemStack stack) |
net.minecraft.item.ItemStack |
insertItem(int slot,
net.minecraft.item.ItemStack stack,
boolean simulate) |
boolean |
isItemValid(int slot,
net.minecraft.item.ItemStack stack) |
net.minecraft.nbt.CompoundNBT |
serializeNBT() |
void |
setStackInSlot(int slot,
net.minecraft.item.ItemStack stack) |
SmartInventory |
whenContentsChanged(java.util.function.Consumer<java.lang.Integer> updateCallback) |
SmartInventory |
withMaxStackSize(int maxStackSize) |
canPlaceItem, clearContent, getContainerSize, getMaxStackSize, isEmpty, removeItem, removeItemNoUpdate, setChanged, setItem, startOpen, stillValid, stopOpenprotected boolean extractionAllowed
protected boolean insertionAllowed
protected boolean stackNonStackables
protected com.simibubi.create.foundation.item.SmartInventory.SyncedStackHandler wrapped
protected int stackSize
public SmartInventory(int slots,
SyncedTileEntity te)
public SmartInventory(int slots,
SyncedTileEntity te,
int stackSize,
boolean stackNonStackables)
public SmartInventory withMaxStackSize(int maxStackSize)
public SmartInventory whenContentsChanged(java.util.function.Consumer<java.lang.Integer> updateCallback)
public SmartInventory allowInsertion()
public SmartInventory allowExtraction()
public SmartInventory forbidInsertion()
public SmartInventory forbidExtraction()
public int getSlots()
public net.minecraft.item.ItemStack insertItem(int slot,
net.minecraft.item.ItemStack stack,
boolean simulate)
public net.minecraft.item.ItemStack extractItem(int slot,
int amount,
boolean simulate)
public int getSlotLimit(int slot)
public boolean isItemValid(int slot,
net.minecraft.item.ItemStack stack)
public void setStackInSlot(int slot,
net.minecraft.item.ItemStack stack)
public net.minecraft.item.ItemStack getItem(int slot)
getItem in interface net.minecraft.inventory.IInventorygetItem in class net.minecraftforge.items.wrapper.RecipeWrapperpublic int getStackLimit(int slot,
@Nonnull
net.minecraft.item.ItemStack stack)
public net.minecraft.nbt.CompoundNBT serializeNBT()
serializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundNBT>public void deserializeNBT(net.minecraft.nbt.CompoundNBT nbt)
deserializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundNBT>public net.minecraft.item.ItemStack getStackInSlotIntermediate(int slot)
public net.minecraft.item.ItemStack getStackInSlot(int slot)
getStackInSlot in interface net.minecraftforge.items.IItemHandler