public class BarrelBlockEntity extends LootableContainerBlockEntity
Modifier and Type | Field and Description |
---|---|
private DefaultedList<ItemStack> |
inventory |
private int |
viewerCount |
lootTableId, lootTableSeed
pos, removed, world
Modifier | Constructor and Description |
---|---|
|
BarrelBlockEntity() |
private |
BarrelBlockEntity(BlockEntityType<?> type) |
Modifier and Type | Method and Description |
---|---|
protected ScreenHandler |
createScreenHandler(int syncId,
PlayerInventory playerInventory) |
void |
fromTag(BlockState state,
CompoundTag tag) |
protected Text |
getContainerName() |
protected DefaultedList<ItemStack> |
getInvStackList() |
void |
onClose(PlayerEntity player) |
void |
onOpen(PlayerEntity player) |
private void |
playSound(BlockState blockState,
SoundEvent soundEvent) |
private void |
scheduleUpdate() |
protected void |
setInvStackList(DefaultedList<ItemStack> list) |
private void |
setOpen(BlockState state,
boolean open) |
int |
size() |
void |
tick() |
CompoundTag |
toTag(CompoundTag tag) |
canPlayerUse, checkLootInteraction, checkUnlocked, clear, createMenu, deserializeLootTable, getStack, isEmpty, removeStack, removeStack, serializeLootTable, setLootTable, setLootTable, setStack
checkUnlocked, getCustomName, getDisplayName, getName, setCustomName
applyMirror, applyRotation, cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markInvalid, markRemoved, onSyncedBlockEvent, populateCrashReport, resetBlock, setLocation, setPos, toInitialChunkDataTag, toUpdatePacket
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
containsAny, count, getMaxCountPerStack, isValid, markDirty
hasCustomName
private DefaultedList<ItemStack> inventory
private int viewerCount
private BarrelBlockEntity(BlockEntityType<?> type)
public BarrelBlockEntity()
public CompoundTag toTag(CompoundTag tag)
toTag
in class LockableContainerBlockEntity
public void fromTag(BlockState state, CompoundTag tag)
fromTag
in class LockableContainerBlockEntity
public int size()
protected DefaultedList<ItemStack> getInvStackList()
getInvStackList
in class LootableContainerBlockEntity
protected void setInvStackList(DefaultedList<ItemStack> list)
setInvStackList
in class LootableContainerBlockEntity
protected Text getContainerName()
getContainerName
in class LockableContainerBlockEntity
protected ScreenHandler createScreenHandler(int syncId, PlayerInventory playerInventory)
createScreenHandler
in class LockableContainerBlockEntity
public void onOpen(PlayerEntity player)
private void scheduleUpdate()
public void tick()
public void onClose(PlayerEntity player)
private void setOpen(BlockState state, boolean open)
private void playSound(BlockState blockState, SoundEvent soundEvent)