public class ChestTileEntity extends LockableLootTileEntity implements IChestLid, ITickableTileEntity
Modifier and Type | Field and Description |
---|---|
private NonNullList<ItemStack> |
chestContents |
private LazyOptional<IItemHandlerModifiable> |
chestHandler |
protected float |
lidAngle |
protected int |
numPlayersUsing |
protected float |
prevLidAngle |
private int |
ticksSinceSync |
lootTable, lootTableSeed
pos, removed, world
INFINITE_EXTENT_AABB
Modifier | Constructor and Description |
---|---|
|
ChestTileEntity() |
protected |
ChestTileEntity(TileEntityType<?> typeIn) |
Modifier and Type | Method and Description |
---|---|
static int |
calculatePlayersUsing(World p_213976_0_,
LockableTileEntity p_213976_1_,
int p_213976_2_,
int p_213976_3_,
int p_213976_4_) |
static int |
calculatePlayersUsingSync(World p_213977_0_,
LockableTileEntity p_213977_1_,
int p_213977_2_,
int p_213977_3_,
int p_213977_4_,
int p_213977_5_,
int p_213977_6_) |
void |
closeInventory(PlayerEntity player) |
private IItemHandlerModifiable |
createHandler() |
protected Container |
createMenu(int id,
PlayerInventory player) |
<T> LazyOptional<T> |
getCapability(Capability<T> cap,
Direction side)
Retrieves the Optional handler for the capability requested on the specific side.
|
protected ITextComponent |
getDefaultName() |
protected NonNullList<ItemStack> |
getItems() |
float |
getLidAngle(float partialTicks) |
static int |
getPlayersUsing(IBlockReader reader,
BlockPos posIn) |
int |
getSizeInventory() |
protected void |
onOpenOrClose() |
void |
openInventory(PlayerEntity player) |
private void |
playSound(SoundEvent soundIn) |
void |
read(CompoundNBT compound) |
boolean |
receiveClientEvent(int id,
int type) |
void |
remove() |
protected void |
setItems(NonNullList<ItemStack> itemsIn) |
static void |
swapContents(ChestTileEntity chest,
ChestTileEntity otherChest) |
void |
tick() |
void |
updateContainingBlockInfo() |
CompoundNBT |
write(CompoundNBT compound) |
canOpen, checkLootAndRead, checkLootAndWrite, clear, createMenu, decrStackSize, fillWithLoot, getStackInSlot, isEmpty, isUsableByPlayer, removeStackFromSlot, setInventorySlotContents, setLootTable, setLootTable
canUnlock, createUnSidedHandler, getCustomName, getDisplayName, getName, setCustomName
addInfoToCrashReport, create, getBlockState, getDistanceSq, getMaxRenderDistanceSquared, getPos, getTileData, getType, getUpdatePacket, getUpdateTag, getWorld, hasWorld, isRemoved, markDirty, mirror, onlyOpsCanSetNbt, rotate, setPos, setWorldAndPos, validate, warnInvalidBlock
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCaps
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
count, getInventoryStackLimit, hasAny, isItemValidForSlot, markDirty
clearObj
hasCustomName
canRenderBreaking, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, hasFastRenderer, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
getCapability
private NonNullList<ItemStack> chestContents
protected float lidAngle
protected float prevLidAngle
protected int numPlayersUsing
private int ticksSinceSync
private LazyOptional<IItemHandlerModifiable> chestHandler
protected ChestTileEntity(TileEntityType<?> typeIn)
public ChestTileEntity()
public int getSizeInventory()
getSizeInventory
in interface IInventory
protected ITextComponent getDefaultName()
getDefaultName
in class LockableTileEntity
public void read(CompoundNBT compound)
read
in class LockableTileEntity
public CompoundNBT write(CompoundNBT compound)
write
in class LockableTileEntity
public void tick()
tick
in interface ITickableTileEntity
public static int calculatePlayersUsingSync(World p_213977_0_, LockableTileEntity p_213977_1_, int p_213977_2_, int p_213977_3_, int p_213977_4_, int p_213977_5_, int p_213977_6_)
public static int calculatePlayersUsing(World p_213976_0_, LockableTileEntity p_213976_1_, int p_213976_2_, int p_213976_3_, int p_213976_4_)
private void playSound(SoundEvent soundIn)
public boolean receiveClientEvent(int id, int type)
receiveClientEvent
in class TileEntity
public void openInventory(PlayerEntity player)
openInventory
in interface IInventory
public void closeInventory(PlayerEntity player)
closeInventory
in interface IInventory
protected void onOpenOrClose()
protected NonNullList<ItemStack> getItems()
getItems
in class LockableLootTileEntity
protected void setItems(NonNullList<ItemStack> itemsIn)
setItems
in class LockableLootTileEntity
public float getLidAngle(float partialTicks)
getLidAngle
in interface IChestLid
public static int getPlayersUsing(IBlockReader reader, BlockPos posIn)
public static void swapContents(ChestTileEntity chest, ChestTileEntity otherChest)
protected Container createMenu(int id, PlayerInventory player)
createMenu
in class LockableTileEntity
public void updateContainingBlockInfo()
updateContainingBlockInfo
in class TileEntity
public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side)
ICapabilityProvider
getCapability
in interface ICapabilityProvider
getCapability
in class LockableTileEntity
private IItemHandlerModifiable createHandler()
public void remove()
remove
in class LockableTileEntity