Class ShulkerBoxBlockEntity
- All Implemented Interfaces:
Inventory
,LootableInventory
,SidedInventory
,NamedScreenHandlerFactory
,ScreenHandlerFactory
,Clearable
,Nameable
- Mappings:
Namespace Name named net/minecraft/block/entity/ShulkerBoxBlockEntity
intermediary net/minecraft/class_2627
official dwi
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.entity.BlockEntity
BlockEntity.ComponentsAccess
-
Field Summary
Modifier and TypeFieldDescriptionprivate float
private static final int[]
static final int
static final int
static final int
static final int
static final float
static final float
private DefaultedList
<ItemStack> static final int
private float
private int
Fields inherited from class net.minecraft.block.entity.LootableContainerBlockEntity
lootTable, lootTableSeed
Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world
Fields inherited from interface net.minecraft.inventory.Inventory
DEFAULT_MAX_INTERACTION_RANGE
Fields inherited from interface net.minecraft.inventory.LootableInventory
LOOT_TABLE_KEY, LOOT_TABLE_SEED_KEY
-
Constructor Summary
ConstructorDescriptionShulkerBoxBlockEntity
(@Nullable DyeColor color, BlockPos pos, BlockState state) ShulkerBoxBlockEntity
(BlockPos pos, BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canExtract
(int slot, ItemStack stack, Direction dir) Returns whether the given stack can be removed from this inventory at the specified slot position from the given direction.boolean
Returns 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) float
getAnimationProgress
(float delta) int[]
getAvailableSlots
(Direction side) Returns the available slot positions that are reachable from a given side.getBoundingBox
(BlockState state) getColor()
protected Text
protected DefaultedList
<ItemStack> void
onClose
(PlayerEntity player) Called when the inventory is closed.void
onOpen
(PlayerEntity player) Called when the inventory is opened.boolean
onSyncedBlockEvent
(int type, int data) If this block entity's block extendsBlockWithEntity
, this is called insideAbstractBlock.onSyncedBlockEvent(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, int, int)
.private void
pushEntities
(World world, BlockPos pos, BlockState state) void
readInventoryNbt
(NbtCompound nbt, RegistryWrapper.WrapperLookup registries) protected void
readNbt
(NbtCompound nbt, RegistryWrapper.WrapperLookup registries) Reads data fromnbt
.protected void
setHeldStacks
(DefaultedList<ItemStack> inventory) int
size()
Returns the size of the inventory.boolean
static void
tick
(World world, BlockPos pos, BlockState state, ShulkerBoxBlockEntity blockEntity) private void
updateAnimation
(World world, BlockPos pos, BlockState state) private static void
updateNeighborStates
(World world, BlockPos pos, BlockState state) protected void
writeNbt
(NbtCompound nbt, RegistryWrapper.WrapperLookup registries) Writes data tonbt
.Methods inherited from class net.minecraft.block.entity.LootableContainerBlockEntity
addComponents, checkUnlocked, createMenu, getLootTable, getLootTableSeed, getStack, isEmpty, readComponents, removeFromCopiedStackNbt, removeStack, removeStack, setLootTable, setLootTableSeed, setStack
Methods inherited from class net.minecraft.block.entity.LockableContainerBlockEntity
canPlayerUse, checkUnlocked, clear, getCustomName, getDisplayName, getName
Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createComponentlessNbt, createComponentlessNbtWithIdentifyingData, createComponentMap, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getComponents, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, populateCrashReport, posFromNbt, read, readComponentlessNbt, readComponents, readComponents, setCachedState, setComponents, setStackNbt, setWorld, supports, toInitialChunkDataNbt, toUpdatePacket, tryParseCustomName, writeIdToNbt
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.inventory.Inventory
canPlayerUse, canTransferTo, containsAny, containsAny, count, getMaxCount, getMaxCountPerStack, getStack, isEmpty, isValid, markDirty, removeStack, removeStack, setStack
Methods inherited from interface net.minecraft.inventory.LootableInventory
generateLoot, getPos, getWorld, readLootTable, setLootTable, writeLootTable
Methods inherited from interface net.minecraft.util.Nameable
hasCustomName
-
Field Details
-
field_31354
public static final int field_31354- See Also:
- Mappings:
Namespace Name Mixin selector named field_31354
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;field_31354:I
intermediary field_31354
Lnet/minecraft/class_2627;field_31354:I
official d
Ldwi;d:I
-
field_31355
public static final int field_31355- See Also:
- Mappings:
Namespace Name Mixin selector named field_31355
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;field_31355:I
intermediary field_31355
Lnet/minecraft/class_2627;field_31355:I
official e
Ldwi;e:I
-
INVENTORY_SIZE
public static final int INVENTORY_SIZE- See Also:
- Mappings:
Namespace Name Mixin selector named INVENTORY_SIZE
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;INVENTORY_SIZE:I
intermediary field_31356
Lnet/minecraft/class_2627;field_31356:I
official f
Ldwi;f:I
-
field_31357
public static final int field_31357- See Also:
- Mappings:
Namespace Name Mixin selector named field_31357
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;field_31357:I
intermediary field_31357
Lnet/minecraft/class_2627;field_31357:I
official g
Ldwi;g:I
-
field_31358
public static final int field_31358- See Also:
- Mappings:
Namespace Name Mixin selector named field_31358
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;field_31358:I
intermediary field_31358
Lnet/minecraft/class_2627;field_31358:I
official h
Ldwi;h:I
-
field_31359
public static final float field_31359- See Also:
- Mappings:
Namespace Name Mixin selector named field_31359
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;field_31359:F
intermediary field_31359
Lnet/minecraft/class_2627;field_31359:F
official i
Ldwi;i:F
-
field_31360
public static final float field_31360- See Also:
- Mappings:
Namespace Name Mixin selector named field_31360
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;field_31360:F
intermediary field_31360
Lnet/minecraft/class_2627;field_31360:F
official j
Ldwi;j:F
-
AVAILABLE_SLOTS
private static final int[] AVAILABLE_SLOTS- Mappings:
Namespace Name Mixin selector named AVAILABLE_SLOTS
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;AVAILABLE_SLOTS:[I
intermediary field_12059
Lnet/minecraft/class_2627;field_12059:[I
official k
Ldwi;k:[I
-
inventory
- Mappings:
Namespace Name Mixin selector named inventory
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;inventory:Lnet/minecraft/util/collection/DefaultedList;
intermediary field_12054
Lnet/minecraft/class_2627;field_12054:Lnet/minecraft/class_2371;
official n
Ldwi;n:Ljz;
-
viewerCount
private int viewerCount- Mappings:
Namespace Name Mixin selector named viewerCount
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;viewerCount:I
intermediary field_12053
Lnet/minecraft/class_2627;field_12053:I
official r
Ldwi;r:I
-
animationStage
- Mappings:
Namespace Name Mixin selector named animationStage
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;animationStage:Lnet/minecraft/block/entity/ShulkerBoxBlockEntity$AnimationStage;
intermediary field_12057
Lnet/minecraft/class_2627;field_12057:Lnet/minecraft/class_2627$class_2628;
official s
Ldwi;s:Ldwi$a;
-
animationProgress
private float animationProgress- Mappings:
Namespace Name Mixin selector named animationProgress
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;animationProgress:F
intermediary field_12056
Lnet/minecraft/class_2627;field_12056:F
official t
Ldwi;t:F
-
prevAnimationProgress
private float prevAnimationProgress- Mappings:
Namespace Name Mixin selector named prevAnimationProgress
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;prevAnimationProgress:F
intermediary field_12055
Lnet/minecraft/class_2627;field_12055:F
official u
Ldwi;u:F
-
cachedColor
- Mappings:
Namespace Name Mixin selector named cachedColor
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;cachedColor:Lnet/minecraft/util/DyeColor;
intermediary field_12060
Lnet/minecraft/class_2627;field_12060:Lnet/minecraft/class_1767;
official v
Ldwi;v:Lcwl;
-
-
Constructor Details
-
ShulkerBoxBlockEntity
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;<init>(Lnet/minecraft/util/DyeColor;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
intermediary <init>
Lnet/minecraft/class_2627;<init>(Lnet/minecraft/class_1767;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
official <init>
Ldwi;<init>(Lcwl;Ljh;Ldxu;)V
-
ShulkerBoxBlockEntity
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
intermediary <init>
Lnet/minecraft/class_2627;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
official <init>
Ldwi;<init>(Ljh;Ldxu;)V
-
-
Method Details
-
tick
public static void tick(World world, BlockPos pos, BlockState state, ShulkerBoxBlockEntity blockEntity) - Mappings:
Namespace Name Mixin selector named tick
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;tick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;)V
intermediary method_31694
Lnet/minecraft/class_2627;method_31694(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2627;)V
official a
Ldwi;a(Ldhh;Ljh;Ldxu;Ldwi;)V
-
updateAnimation
- Mappings:
Namespace Name Mixin selector named updateAnimation
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;updateAnimation(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
intermediary method_11318
Lnet/minecraft/class_2627;method_11318(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
official b
Ldwi;b(Ldhh;Ljh;Ldxu;)V
-
getAnimationStage
- Mappings:
Namespace Name Mixin selector named getAnimationStage
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;getAnimationStage()Lnet/minecraft/block/entity/ShulkerBoxBlockEntity$AnimationStage;
intermediary method_11313
Lnet/minecraft/class_2627;method_11313()Lnet/minecraft/class_2627$class_2628;
official k
Ldwi;k()Ldwi$a;
-
getBoundingBox
- Mappings:
Namespace Name Mixin selector named getBoundingBox
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;getBoundingBox(Lnet/minecraft/block/BlockState;)Lnet/minecraft/util/math/Box;
intermediary method_11314
Lnet/minecraft/class_2627;method_11314(Lnet/minecraft/class_2680;)Lnet/minecraft/class_238;
official a
Ldwi;a(Ldxu;)Lfbs;
-
pushEntities
- Mappings:
Namespace Name Mixin selector named pushEntities
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;pushEntities(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
intermediary method_11316
Lnet/minecraft/class_2627;method_11316(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
official c
Ldwi;c(Ldhh;Ljh;Ldxu;)V
-
size
public int size()Returns the size of the inventory.The inventory should support the slot ID from
0
tosize() - 1
. This should remain constant throughout the inventory's lifetime. -
onSyncedBlockEvent
public boolean onSyncedBlockEvent(int type, int data) If this block entity's block extendsBlockWithEntity
, this is called insideAbstractBlock.onSyncedBlockEvent(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, int, int)
.- Overrides:
onSyncedBlockEvent
in classBlockEntity
- See Also:
- Mappings:
Namespace Name Mixin selector named onSyncedBlockEvent
Lnet/minecraft/block/entity/BlockEntity;onSyncedBlockEvent(II)Z
intermediary method_11004
Lnet/minecraft/class_2586;method_11004(II)Z
official a_
Lduw;a_(II)Z
-
updateNeighborStates
- Mappings:
Namespace Name Mixin selector named updateNeighborStates
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;updateNeighborStates(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
intermediary method_20047
Lnet/minecraft/class_2627;method_20047(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
official d
Ldwi;d(Ldhh;Ljh;Ldxu;)V
-
onOpen
Called when the inventory is opened. Specifically, this is called inside theScreenHandler
constructor. This does nothing by default.The method is called in both the client and the server. However, because clientside screen handler is created with a
SimpleInventory
, other implementations can (and the vanilla code does) assume that the method is called in the server.- Specified by:
onOpen
in interfaceInventory
- Mappings:
Namespace Name Mixin selector named onOpen
Lnet/minecraft/inventory/Inventory;onOpen(Lnet/minecraft/entity/player/PlayerEntity;)V
intermediary method_5435
Lnet/minecraft/class_1263;method_5435(Lnet/minecraft/class_1657;)V
official c_
Lbtb;c_(Lcpw;)V
-
onClose
Called when the inventory is closed. Specifically, this is called insideScreenHandler.onClosed(net.minecraft.entity.player.PlayerEntity)
. This does nothing by default.The method is called in both the client and the server. However, because clientside screen handler is created with a
SimpleInventory
, other implementations can (and the vanilla code does) assume that the method is called in the server.- Specified by:
onClose
in interfaceInventory
- Mappings:
Namespace Name Mixin selector named onClose
Lnet/minecraft/inventory/Inventory;onClose(Lnet/minecraft/entity/player/PlayerEntity;)V
intermediary method_5432
Lnet/minecraft/class_1263;method_5432(Lnet/minecraft/class_1657;)V
official c
Lbtb;c(Lcpw;)V
-
getContainerName
- Specified by:
getContainerName
in classLockableContainerBlockEntity
- Mappings:
Namespace Name Mixin selector named getContainerName
Lnet/minecraft/block/entity/LockableContainerBlockEntity;getContainerName()Lnet/minecraft/text/Text;
intermediary method_17823
Lnet/minecraft/class_2624;method_17823()Lnet/minecraft/class_2561;
official j
Lduq;j()Lxv;
-
readNbt
Reads data fromnbt
. Subclasses should override this if they store a persistent data.NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.
nbt
might not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.- Overrides:
readNbt
in classLockableContainerBlockEntity
- See Also:
- Mappings:
Namespace Name Mixin selector named readNbt
Lnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
intermediary method_11014
Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
official a
Lduw;a(Lux;Ljs$a;)V
-
writeNbt
Writes data tonbt
. Subclasses should override this if they store a persistent data.NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.
- Overrides:
writeNbt
in classLockableContainerBlockEntity
- See Also:
- Mappings:
Namespace Name Mixin selector named writeNbt
Lnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
intermediary method_11007
Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
official b
Lduw;b(Lux;Ljs$a;)V
-
readInventoryNbt
- Mappings:
Namespace Name Mixin selector named readInventoryNbt
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;readInventoryNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
intermediary method_11319
Lnet/minecraft/class_2627;method_11319(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
official e
Ldwi;e(Lux;Ljs$a;)V
-
getHeldStacks
- Specified by:
getHeldStacks
in classLockableContainerBlockEntity
- Mappings:
Namespace Name Mixin selector named getHeldStacks
Lnet/minecraft/block/entity/LockableContainerBlockEntity;getHeldStacks()Lnet/minecraft/util/collection/DefaultedList;
intermediary method_11282
Lnet/minecraft/class_2624;method_11282()Lnet/minecraft/class_2371;
official f
Lduq;f()Ljz;
-
setHeldStacks
- Specified by:
setHeldStacks
in classLockableContainerBlockEntity
- Mappings:
Namespace Name Mixin selector named setHeldStacks
Lnet/minecraft/block/entity/LockableContainerBlockEntity;setHeldStacks(Lnet/minecraft/util/collection/DefaultedList;)V
intermediary method_11281
Lnet/minecraft/class_2624;method_11281(Lnet/minecraft/class_2371;)V
official a
Lduq;a(Ljz;)V
-
getAvailableSlots
Returns the available slot positions that are reachable from a given side.- Specified by:
getAvailableSlots
in interfaceSidedInventory
- Returns:
- the available slot positions that are reachable from a given side
- Mappings:
Namespace Name Mixin selector named getAvailableSlots
Lnet/minecraft/inventory/SidedInventory;getAvailableSlots(Lnet/minecraft/util/math/Direction;)[I
intermediary method_5494
Lnet/minecraft/class_1278;method_5494(Lnet/minecraft/class_2350;)[I
official a
Lbts;a(Ljm;)[I
-
canInsert
Returns whether the given stack can be inserted into this inventory at the specified slot position from the given direction.- Specified by:
canInsert
in interfaceSidedInventory
- Returns:
- whether the given stack can be inserted into this inventory at the specified slot position from the given direction
- Mappings:
Namespace Name Mixin selector named canInsert
Lnet/minecraft/inventory/SidedInventory;canInsert(ILnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/Direction;)Z
intermediary method_5492
Lnet/minecraft/class_1278;method_5492(ILnet/minecraft/class_1799;Lnet/minecraft/class_2350;)Z
official a
Lbts;a(ILcxo;Ljm;)Z
-
canExtract
Returns whether the given stack can be removed from this inventory at the specified slot position from the given direction.- Specified by:
canExtract
in interfaceSidedInventory
- Returns:
- whether the given stack can be removed from this inventory at the specified slot position from the given direction
- Mappings:
Namespace Name Mixin selector named canExtract
Lnet/minecraft/inventory/SidedInventory;canExtract(ILnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/Direction;)Z
intermediary method_5493
Lnet/minecraft/class_1278;method_5493(ILnet/minecraft/class_1799;Lnet/minecraft/class_2350;)Z
official b
Lbts;b(ILcxo;Ljm;)Z
-
getAnimationProgress
public float getAnimationProgress(float delta) - Mappings:
Namespace Name Mixin selector named getAnimationProgress
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;getAnimationProgress(F)F
intermediary method_11312
Lnet/minecraft/class_2627;method_11312(F)F
official a
Ldwi;a(F)F
-
getColor
- Mappings:
Namespace Name Mixin selector named getColor
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;getColor()Lnet/minecraft/util/DyeColor;
intermediary method_11320
Lnet/minecraft/class_2627;method_11320()Lnet/minecraft/class_1767;
official t
Ldwi;t()Lcwl;
-
createScreenHandler
- Specified by:
createScreenHandler
in classLockableContainerBlockEntity
- Mappings:
Namespace Name Mixin selector named createScreenHandler
Lnet/minecraft/block/entity/LockableContainerBlockEntity;createScreenHandler(ILnet/minecraft/entity/player/PlayerInventory;)Lnet/minecraft/screen/ScreenHandler;
intermediary method_5465
Lnet/minecraft/class_2624;method_5465(ILnet/minecraft/class_1661;)Lnet/minecraft/class_1703;
official a
Lduq;a(ILcpv;)Lctb;
-
suffocates
public boolean suffocates()- Mappings:
Namespace Name Mixin selector named suffocates
Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;suffocates()Z
intermediary method_27093
Lnet/minecraft/class_2627;method_27093()Z
official u
Ldwi;u()Z
-