public class BarrelBlockEntity extends LootableContainerBlockEntity
| Modifier and Type | Field and Description |
|---|---|
private DefaultedList<ItemStack> |
inventory |
private ChestStateManager |
stateManager |
lootTableId, lootTableSeedpos, removed, world| Constructor and Description |
|---|
BarrelBlockEntity(BlockPos pos,
BlockState state) |
| Modifier and Type | Method and Description |
|---|---|
protected ScreenHandler |
createScreenHandler(int syncId,
PlayerInventory playerInventory) |
void |
fromTag(CompoundTag compoundTag) |
protected Text |
getContainerName() |
protected DefaultedList<ItemStack> |
getInvStackList() |
void |
onClose(PlayerEntity player) |
void |
onOpen(PlayerEntity player) |
private void |
playSound(BlockState state,
SoundEvent soundEvent) |
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, setCustomNamecancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, setCachedState, setWorld, toInitialChunkDataTag, toUpdatePacketclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontainsAny, count, getMaxCountPerStack, isValid, markDirtyhasCustomNameprivate DefaultedList<ItemStack> inventory
private ChestStateManager stateManager
public BarrelBlockEntity(BlockPos pos, BlockState state)
public CompoundTag toTag(CompoundTag tag)
toTag in class LockableContainerBlockEntitypublic void fromTag(CompoundTag compoundTag)
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)
public void onClose(PlayerEntity player)
public void tick()
private void setOpen(BlockState state, boolean open)
private void playSound(BlockState state, SoundEvent soundEvent)