@EnvironmentInterfaces(value=@EnvironmentInterface(value=CLIENT,itf=ChestAnimationProgress.class)) public class ChestBlockEntity extends LootableContainerBlockEntity implements ChestAnimationProgress, Tickable
| Modifier and Type | Field and Description |
|---|---|
protected float |
animationAngle |
private DefaultedList<ItemStack> |
inventory |
protected float |
lastAnimationAngle |
private int |
ticksOpen |
protected int |
viewerCount |
lootTableId, lootTableSeedpos, removed, world| Modifier | Constructor and Description |
|---|---|
|
ChestBlockEntity() |
protected |
ChestBlockEntity(BlockEntityType<?> type) |
canPlayerUse, checkLootInteraction, checkUnlocked, clear, createMenu, deserializeLootTable, getStack, isEmpty, removeStack, removeStack, serializeLootTable, setLootTable, setLootTable, setStackcheckUnlocked, getCustomName, getDisplayName, getName, setCustomNameapplyMirror, applyRotation, cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markInvalid, markRemoved, populateCrashReport, resetBlock, setLocation, setPos, toInitialChunkDataTag, toUpdatePacketclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontainsAny, count, getMaxCountPerStack, isValid, markDirtyhasCustomNameprivate DefaultedList<ItemStack> inventory
protected float animationAngle
protected float lastAnimationAngle
protected int viewerCount
private int ticksOpen
protected ChestBlockEntity(BlockEntityType<?> type)
public ChestBlockEntity()
protected Text getContainerName()
getContainerName in class LockableContainerBlockEntitypublic void fromTag(BlockState state, CompoundTag tag)
fromTag in class LockableContainerBlockEntitypublic CompoundTag toTag(CompoundTag tag)
toTag in class LockableContainerBlockEntitypublic static int tickViewerCount(World world, LockableContainerBlockEntity blockEntity, int ticksOpen, int x, int y, int z, int viewerCount)
public static int countViewers(World world, LockableContainerBlockEntity container, int ticksOpen, int x, int y)
private void playSound(SoundEvent soundEvent)
public boolean onBlockAction(int int2,
int int3)
onBlockAction in class BlockEntitypublic void onOpen(PlayerEntity player)
public void onClose(PlayerEntity player)
protected void onInvOpenOrClose()
protected DefaultedList<ItemStack> getInvStackList()
getInvStackList in class LootableContainerBlockEntityprotected void setInvStackList(DefaultedList<ItemStack> list)
setInvStackList in class LootableContainerBlockEntity@Environment(value=CLIENT) public float getAnimationProgress(float float2)
getAnimationProgress in interface ChestAnimationProgresspublic static int getPlayersLookingInChestCount(BlockView world, BlockPos pos)
public static void copyInventory(ChestBlockEntity from, ChestBlockEntity to)
protected ScreenHandler createContainer(int int2, PlayerInventory playerInventory)
createContainer in class LockableContainerBlockEntity