public abstract class InventoryTileEntity extends net.minecraft.tileentity.TileEntity implements IBasicInventory, net.minecraft.inventory.container.INamedContainerProvider
Modifier | Constructor and Description |
---|---|
protected |
InventoryTileEntity(net.minecraft.tileentity.TileEntityType<?> type,
java.lang.String inventoryName,
int rows) |
Modifier and Type | Method and Description |
---|---|
boolean |
addToInventory(net.minecraft.item.ItemStack stack) |
net.minecraft.inventory.container.Container |
createMenu(int id,
net.minecraft.entity.player.PlayerInventory playerInventory,
net.minecraft.entity.player.PlayerEntity playerIn) |
int |
getContainerSize() |
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> |
getContents() |
java.lang.String |
getCustomName() |
net.minecraft.util.text.ITextComponent |
getDisplayName() |
net.minecraft.item.ItemStack |
getItem(int index) |
int |
getMaxStackSize() |
boolean |
hasCustomName() |
boolean |
isEmpty() |
void |
load(net.minecraft.block.BlockState state,
net.minecraft.nbt.CompoundNBT nbt) |
net.minecraft.item.ItemStack |
removeItem(int index,
int count) |
net.minecraft.item.ItemStack |
removeItemNoUpdate(int index) |
net.minecraft.nbt.CompoundNBT |
save(net.minecraft.nbt.CompoundNBT nbt) |
void |
setItem(int index,
net.minecraft.item.ItemStack stack) |
boolean |
stillValid(net.minecraft.entity.player.PlayerEntity player) |
clearCache, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getUpdatePacket, getUpdateTag, getViewDistance, hasLevel, isRemoved, loadStatic, logInvalidState, mirror, onChunkUnloaded, onlyOpCanSetNbt, rotate, setChanged, setLevelAndPosition, setPosition, setRemoved, triggerEvent
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canPlaceItem, clearContent, startOpen, stopOpen
protected InventoryTileEntity(net.minecraft.tileentity.TileEntityType<?> type, java.lang.String inventoryName, int rows)
public net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> getContents()
public void load(net.minecraft.block.BlockState state, net.minecraft.nbt.CompoundNBT nbt)
load
in class net.minecraft.tileentity.TileEntity
public boolean addToInventory(net.minecraft.item.ItemStack stack)
public net.minecraft.nbt.CompoundNBT save(net.minecraft.nbt.CompoundNBT nbt)
save
in class net.minecraft.tileentity.TileEntity
public boolean isEmpty()
isEmpty
in interface net.minecraft.inventory.IInventory
public net.minecraft.item.ItemStack getItem(int index)
getItem
in interface net.minecraft.inventory.IInventory
public net.minecraft.item.ItemStack removeItem(int index, int count)
removeItem
in interface IBasicInventory
removeItem
in interface net.minecraft.inventory.IInventory
public net.minecraft.item.ItemStack removeItemNoUpdate(int index)
removeItemNoUpdate
in interface net.minecraft.inventory.IInventory
public void setItem(int index, net.minecraft.item.ItemStack stack)
setItem
in interface net.minecraft.inventory.IInventory
public int getMaxStackSize()
getMaxStackSize
in interface IBasicInventory
getMaxStackSize
in interface net.minecraft.inventory.IInventory
public boolean stillValid(net.minecraft.entity.player.PlayerEntity player)
stillValid
in interface net.minecraft.inventory.IInventory
public java.lang.String getCustomName()
public boolean hasCustomName()
public net.minecraft.util.text.ITextComponent getDisplayName()
getDisplayName
in interface net.minecraft.inventory.container.INamedContainerProvider
@Nullable public net.minecraft.inventory.container.Container createMenu(int id, net.minecraft.entity.player.PlayerInventory playerInventory, net.minecraft.entity.player.PlayerEntity playerIn)
createMenu
in interface net.minecraft.inventory.container.IContainerProvider
public int getContainerSize()
getContainerSize
in interface net.minecraft.inventory.IInventory