public class BarrelBlockEntity extends LootableContainerBlockEntity
| Modifier and Type | Field and Description |
|---|---|
private DefaultedList<ItemStack> |
inventory |
private int |
viewerCount |
lootTableId, lootTableSeedpos, 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, setStackcheckUnlocked, getCustomName, getDisplayName, getName, setCustomNameapplyMirror, applyRotation, cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markInvalid, markRemoved, onSyncedBlockEvent, populateCrashReport, resetBlock, setLocation, setPos, toInitialChunkDataTag, toUpdatePacketclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontainsAny, count, getMaxCountPerStack, isValid, markDirtyhasCustomNameprivate DefaultedList<ItemStack> inventory
private int viewerCount
private BarrelBlockEntity(BlockEntityType<?> type)
public BarrelBlockEntity()
public CompoundTag toTag(CompoundTag tag)
toTag in class LockableContainerBlockEntitypublic void fromTag(BlockState state, CompoundTag tag)
fromTag in class LockableContainerBlockEntitypublic int size()
protected DefaultedList<ItemStack> getInvStackList()
getInvStackList in class LootableContainerBlockEntityprotected void setInvStackList(DefaultedList<ItemStack> list)
setInvStackList in class LootableContainerBlockEntityprotected Text getContainerName()
getContainerName in class LockableContainerBlockEntityprotected ScreenHandler createScreenHandler(int syncId, PlayerInventory playerInventory)
createScreenHandler in class LockableContainerBlockEntitypublic 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)