public class ShulkerBoxBlockEntity extends LootableContainerBlockEntity implements SidedInventory, Tickable
| Modifier and Type | Class and Description |
|---|---|
static class |
ShulkerBoxBlockEntity.AnimationStage |
| Modifier and Type | Field and Description |
|---|---|
private float |
animationProgress |
private ShulkerBoxBlockEntity.AnimationStage |
animationStage |
private static int[] |
AVAILABLE_SLOTS |
private DyeColor |
cachedColor |
private boolean |
cachedColorUpdateNeeded |
private DefaultedList<ItemStack> |
inventory |
private float |
prevAnimationProgress |
private int |
viewerCount |
lootTableId, lootTableSeedpos, removed, world| Constructor and Description |
|---|
ShulkerBoxBlockEntity() |
ShulkerBoxBlockEntity(DyeColor color) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canExtract(int slot,
ItemStack stack,
Direction dir)
Determines whether the given stack can be removed from this inventory at the specified slot position from the given direction.
|
boolean |
canInsert(int slot,
ItemStack stack,
Direction dir)
Determines whether the given stack can be inserted into this inventory at the specified slot position from the given direction.
|
protected ScreenHandler |
createScreenHandler(int syncId,
PlayerInventory playerInventory) |
void |
deserializeInventory(CompoundTag tag) |
void |
fromTag(BlockState state,
CompoundTag tag) |
float |
getAnimationProgress(float float2) |
ShulkerBoxBlockEntity.AnimationStage |
getAnimationStage() |
int[] |
getAvailableSlots(Direction side)
Gets the available slot positions that are reachable from a given side.
|
Box |
getBoundingBox(BlockState state) |
Box |
getBoundingBox(Direction openDirection) |
private Box |
getCollisionBox(Direction facing) |
DyeColor |
getColor() |
protected Text |
getContainerName() |
protected DefaultedList<ItemStack> |
getInvStackList() |
void |
onClose(PlayerEntity player) |
void |
onOpen(PlayerEntity player) |
boolean |
onSyncedBlockEvent(int type,
int data) |
private void |
pushEntities() |
CompoundTag |
serializeInventory(CompoundTag tag) |
protected void |
setInvStackList(DefaultedList<ItemStack> list) |
int |
size() |
boolean |
suffocates() |
void |
tick() |
CompoundTag |
toTag(CompoundTag tag) |
protected void |
updateAnimation() |
private void |
updateNeighborStates() |
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, waitcanPlayerUse, containsAny, count, getMaxCountPerStack, getStack, isEmpty, isValid, markDirty, removeStack, removeStack, setStackhasCustomNameprivate static final int[] AVAILABLE_SLOTS
private DefaultedList<ItemStack> inventory
private int viewerCount
private ShulkerBoxBlockEntity.AnimationStage animationStage
private float animationProgress
private float prevAnimationProgress
private boolean cachedColorUpdateNeeded
protected void updateAnimation()
public ShulkerBoxBlockEntity.AnimationStage getAnimationStage()
public Box getBoundingBox(BlockState state)
private void pushEntities()
public boolean onSyncedBlockEvent(int type,
int data)
onSyncedBlockEvent in class BlockEntityprivate void updateNeighborStates()
public void onOpen(PlayerEntity player)
public void onClose(PlayerEntity player)
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 void deserializeInventory(CompoundTag tag)
public CompoundTag serializeInventory(CompoundTag tag)
protected DefaultedList<ItemStack> getInvStackList()
getInvStackList in class LootableContainerBlockEntityprotected void setInvStackList(DefaultedList<ItemStack> list)
setInvStackList in class LootableContainerBlockEntitypublic int[] getAvailableSlots(Direction side)
getAvailableSlots in interface SidedInventorypublic boolean canInsert(int slot,
ItemStack stack,
@Nullable
Direction dir)
canInsert in interface SidedInventorypublic boolean canExtract(int slot,
ItemStack stack,
Direction dir)
canExtract in interface SidedInventorypublic float getAnimationProgress(float float2)
protected ScreenHandler createScreenHandler(int syncId, PlayerInventory playerInventory)
createScreenHandler in class LockableContainerBlockEntitypublic boolean suffocates()