public class ShulkerBoxBlockEntity extends LootableContainerBlockEntity implements SidedInventory
| 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 DefaultedList<ItemStack> |
inventory |
private float |
prevAnimationProgress |
private int |
viewerCount |
lootTableId, lootTableSeedpos, removed, world| Constructor and Description |
|---|
ShulkerBoxBlockEntity(BlockPos blockPos,
BlockState blockState) |
ShulkerBoxBlockEntity(DyeColor color,
BlockPos blockPos,
BlockState blockState) |
| 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(CompoundTag compoundTag) |
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) |
static Box |
getBoundingBox(Direction direction,
float float2) |
private static Box |
getCollisionBox(Direction direction,
float float2) |
DyeColor |
getColor() |
protected Text |
getContainerName() |
protected DefaultedList<ItemStack> |
getInvStackList() |
void |
onClose(PlayerEntity player) |
void |
onOpen(PlayerEntity player) |
boolean |
onSyncedBlockEvent(int type,
int data) |
private static void |
pushEntities(World world,
BlockPos blockPos,
BlockState blockState,
float float2) |
CompoundTag |
serializeInventory(CompoundTag tag) |
protected void |
setInvStackList(DefaultedList<ItemStack> list) |
int |
size() |
boolean |
suffocates() |
static void |
tick(World world,
BlockPos blockPos,
BlockState blockState,
ShulkerBoxBlockEntity shulkerBoxBlockEntity) |
CompoundTag |
toTag(CompoundTag tag) |
private static void |
updateAnimation(World world,
BlockPos blockPos,
BlockState blockState,
ShulkerBoxBlockEntity shulkerBoxBlockEntity) |
private static void |
updateNeighborStates(World world,
BlockPos blockPos,
BlockState blockState) |
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, populateCrashReport, setCachedState, setWorld, 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
public ShulkerBoxBlockEntity(@Nullable DyeColor color, BlockPos blockPos, BlockState blockState)
public ShulkerBoxBlockEntity(BlockPos blockPos, BlockState blockState)
public static void tick(World world, BlockPos blockPos, BlockState blockState, ShulkerBoxBlockEntity shulkerBoxBlockEntity)
private static void updateAnimation(World world, BlockPos blockPos, BlockState blockState, ShulkerBoxBlockEntity shulkerBoxBlockEntity)
public ShulkerBoxBlockEntity.AnimationStage getAnimationStage()
public Box getBoundingBox(BlockState state)
private static void pushEntities(World world, BlockPos blockPos, BlockState blockState, float float2)
public boolean onSyncedBlockEvent(int type,
int data)
onSyncedBlockEvent in class BlockEntityprivate static void updateNeighborStates(World world, BlockPos blockPos, BlockState blockState)
public void onOpen(PlayerEntity player)
public void onClose(PlayerEntity player)
protected Text getContainerName()
getContainerName in class LockableContainerBlockEntitypublic void fromTag(CompoundTag compoundTag)
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()