Class ShulkerBoxBlockEntity
- All Implemented Interfaces:
Inventory,LootableInventory,SidedInventory,NamedScreenHandlerFactory,ScreenHandlerFactory,Clearable,Nameable
- Mappings:
Namespace Name named net/minecraft/block/entity/ShulkerBoxBlockEntityintermediary net/minecraft/class_2627official drr
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.block.entity.BlockEntity
BlockEntity.ComponentsAccess -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate floatprivate static final int[]static final intstatic final intstatic final intstatic final intstatic final floatstatic final floatprivate DefaultedList<ItemStack> static final intprivate floatprivate intFields inherited from class net.minecraft.block.entity.LootableContainerBlockEntity
lootTable, lootTableSeedFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, worldFields inherited from interface net.minecraft.inventory.Inventory
DEFAULT_MAX_INTERACTION_RANGEFields inherited from interface net.minecraft.inventory.LootableInventory
LOOT_TABLE_KEY, LOOT_TABLE_SEED_KEY -
Constructor Summary
ConstructorsConstructorDescriptionShulkerBoxBlockEntity(@Nullable DyeColor color, BlockPos pos, BlockState state) ShulkerBoxBlockEntity(BlockPos pos, BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanExtract(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.booleanReturns whether the given stack can be inserted into this inventory at the specified slot position from the given direction.protected ScreenHandlercreateScreenHandler(int syncId, PlayerInventory playerInventory) floatgetAnimationProgress(float delta) int[]getAvailableSlots(Direction side) Returns the available slot positions that are reachable from a given side.getBoundingBox(BlockState state) getColor()protected Textprotected DefaultedList<ItemStack> voidonClose(PlayerEntity player) Called when the inventory is closed.voidonOpen(PlayerEntity player) Called when the inventory is opened.booleanonSyncedBlockEvent(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 voidpushEntities(World world, BlockPos pos, BlockState state) voidreadInventoryNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registries) protected voidreadNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) Reads data fromnbt.protected voidsetHeldStacks(DefaultedList<ItemStack> inventory) intsize()Returns the size of the inventory.booleanstatic voidtick(World world, BlockPos pos, BlockState state, ShulkerBoxBlockEntity blockEntity) private voidupdateAnimation(World world, BlockPos pos, BlockState state) private static voidupdateNeighborStates(World world, BlockPos pos, BlockState state) protected voidwriteNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) 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, setStackMethods inherited from class net.minecraft.block.entity.LockableContainerBlockEntity
canPlayerUse, checkUnlocked, clear, getCustomName, getDisplayName, getNameMethods 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, toInitialChunkDataNbt, toUpdatePacket, tryParseCustomName, writeIdToNbtMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.inventory.Inventory
canPlayerUse, canTransferTo, containsAny, containsAny, count, getMaxCount, getMaxCountPerStack, getStack, isEmpty, isValid, markDirty, removeStack, removeStack, setStackMethods inherited from interface net.minecraft.inventory.LootableInventory
generateLoot, getPos, getWorld, readLootTable, setLootTable, writeLootTableMethods 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_31354Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;field_31354:Iintermediary field_31354Lnet/minecraft/class_2627;field_31354:Iofficial dLdrr;d:I
-
field_31355
public static final int field_31355- See Also:
- Mappings:
Namespace Name Mixin selector named field_31355Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;field_31355:Iintermediary field_31355Lnet/minecraft/class_2627;field_31355:Iofficial eLdrr;e:I
-
INVENTORY_SIZE
public static final int INVENTORY_SIZE- See Also:
- Mappings:
Namespace Name Mixin selector named INVENTORY_SIZELnet/minecraft/block/entity/ShulkerBoxBlockEntity;INVENTORY_SIZE:Iintermediary field_31356Lnet/minecraft/class_2627;field_31356:Iofficial fLdrr;f:I
-
field_31357
public static final int field_31357- See Also:
- Mappings:
Namespace Name Mixin selector named field_31357Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;field_31357:Iintermediary field_31357Lnet/minecraft/class_2627;field_31357:Iofficial gLdrr;g:I
-
field_31358
public static final int field_31358- See Also:
- Mappings:
Namespace Name Mixin selector named field_31358Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;field_31358:Iintermediary field_31358Lnet/minecraft/class_2627;field_31358:Iofficial hLdrr;h:I
-
field_31359
public static final float field_31359- See Also:
- Mappings:
Namespace Name Mixin selector named field_31359Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;field_31359:Fintermediary field_31359Lnet/minecraft/class_2627;field_31359:Fofficial iLdrr;i:F
-
field_31360
public static final float field_31360- See Also:
- Mappings:
Namespace Name Mixin selector named field_31360Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;field_31360:Fintermediary field_31360Lnet/minecraft/class_2627;field_31360:Fofficial jLdrr;j:F
-
AVAILABLE_SLOTS
private static final int[] AVAILABLE_SLOTS- Mappings:
Namespace Name Mixin selector named AVAILABLE_SLOTSLnet/minecraft/block/entity/ShulkerBoxBlockEntity;AVAILABLE_SLOTS:[Iintermediary field_12059Lnet/minecraft/class_2627;field_12059:[Iofficial kLdrr;k:[I
-
inventory
- Mappings:
Namespace Name Mixin selector named inventoryLnet/minecraft/block/entity/ShulkerBoxBlockEntity;inventory:Lnet/minecraft/util/collection/DefaultedList;intermediary field_12054Lnet/minecraft/class_2627;field_12054:Lnet/minecraft/class_2371;official qLdrr;q:Ljv;
-
viewerCount
private int viewerCount- Mappings:
Namespace Name Mixin selector named viewerCountLnet/minecraft/block/entity/ShulkerBoxBlockEntity;viewerCount:Iintermediary field_12053Lnet/minecraft/class_2627;field_12053:Iofficial rLdrr;r:I
-
animationStage
- Mappings:
Namespace Name Mixin selector named animationStageLnet/minecraft/block/entity/ShulkerBoxBlockEntity;animationStage:Lnet/minecraft/block/entity/ShulkerBoxBlockEntity$AnimationStage;intermediary field_12057Lnet/minecraft/class_2627;field_12057:Lnet/minecraft/class_2627$class_2628;official sLdrr;s:Ldrr$a;
-
animationProgress
private float animationProgress- Mappings:
Namespace Name Mixin selector named animationProgressLnet/minecraft/block/entity/ShulkerBoxBlockEntity;animationProgress:Fintermediary field_12056Lnet/minecraft/class_2627;field_12056:Fofficial tLdrr;t:F
-
prevAnimationProgress
private float prevAnimationProgress- Mappings:
Namespace Name Mixin selector named prevAnimationProgressLnet/minecraft/block/entity/ShulkerBoxBlockEntity;prevAnimationProgress:Fintermediary field_12055Lnet/minecraft/class_2627;field_12055:Fofficial uLdrr;u:F
-
cachedColor
- Mappings:
Namespace Name Mixin selector named cachedColorLnet/minecraft/block/entity/ShulkerBoxBlockEntity;cachedColor:Lnet/minecraft/util/DyeColor;intermediary field_12060Lnet/minecraft/class_2627;field_12060:Lnet/minecraft/class_1767;official vLdrr;v:Lcti;
-
-
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;)Vintermediary <init>Lnet/minecraft/class_2627;<init>(Lnet/minecraft/class_1767;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial <init>Ldrr;<init>(Lcti;Ljd;Ldtc;)V
-
ShulkerBoxBlockEntity
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Vintermediary <init>Lnet/minecraft/class_2627;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial <init>Ldrr;<init>(Ljd;Ldtc;)V
-
-
Method Details
-
tick
public static void tick(World world, BlockPos pos, BlockState state, ShulkerBoxBlockEntity blockEntity) - Mappings:
Namespace Name Mixin selector named tickLnet/minecraft/block/entity/ShulkerBoxBlockEntity;tick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/ShulkerBoxBlockEntity;)Vintermediary method_31694Lnet/minecraft/class_2627;method_31694(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2627;)Vofficial aLdrr;a(Ldcw;Ljd;Ldtc;Ldrr;)V
-
updateAnimation
- Mappings:
Namespace Name Mixin selector named updateAnimationLnet/minecraft/block/entity/ShulkerBoxBlockEntity;updateAnimation(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Vintermediary method_11318Lnet/minecraft/class_2627;method_11318(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial bLdrr;b(Ldcw;Ljd;Ldtc;)V
-
getAnimationStage
- Mappings:
Namespace Name Mixin selector named getAnimationStageLnet/minecraft/block/entity/ShulkerBoxBlockEntity;getAnimationStage()Lnet/minecraft/block/entity/ShulkerBoxBlockEntity$AnimationStage;intermediary method_11313Lnet/minecraft/class_2627;method_11313()Lnet/minecraft/class_2627$class_2628;official lLdrr;l()Ldrr$a;
-
getBoundingBox
- Mappings:
Namespace Name Mixin selector named getBoundingBoxLnet/minecraft/block/entity/ShulkerBoxBlockEntity;getBoundingBox(Lnet/minecraft/block/BlockState;)Lnet/minecraft/util/math/Box;intermediary method_11314Lnet/minecraft/class_2627;method_11314(Lnet/minecraft/class_2680;)Lnet/minecraft/class_238;official aLdrr;a(Ldtc;)Lewx;
-
pushEntities
- Mappings:
Namespace Name Mixin selector named pushEntitiesLnet/minecraft/block/entity/ShulkerBoxBlockEntity;pushEntities(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Vintermediary method_11316Lnet/minecraft/class_2627;method_11316(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial cLdrr;c(Ldcw;Ljd;Ldtc;)V
-
size
public int size()Returns the size of the inventory.The inventory should support the slot ID from
0tosize() - 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:
onSyncedBlockEventin classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector named onSyncedBlockEventLnet/minecraft/block/entity/BlockEntity;onSyncedBlockEvent(II)Zintermediary method_11004Lnet/minecraft/class_2586;method_11004(II)Zofficial a_Ldqh;a_(II)Z
-
updateNeighborStates
- Mappings:
Namespace Name Mixin selector named updateNeighborStatesLnet/minecraft/block/entity/ShulkerBoxBlockEntity;updateNeighborStates(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Vintermediary method_20047Lnet/minecraft/class_2627;method_20047(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial dLdrr;d(Ldcw;Ljd;Ldtc;)V
-
onOpen
Called when the inventory is opened. Specifically, this is called inside theScreenHandlerconstructor. 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:
onOpenin interfaceInventory- Mappings:
Namespace Name Mixin selector named onOpenLnet/minecraft/inventory/Inventory;onOpen(Lnet/minecraft/entity/player/PlayerEntity;)Vintermediary method_5435Lnet/minecraft/class_1263;method_5435(Lnet/minecraft/class_1657;)Vofficial d_Lbqk;d_(Lcmx;)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:
onClosein interfaceInventory- Mappings:
Namespace Name Mixin selector named onCloseLnet/minecraft/inventory/Inventory;onClose(Lnet/minecraft/entity/player/PlayerEntity;)Vintermediary method_5432Lnet/minecraft/class_1263;method_5432(Lnet/minecraft/class_1657;)Vofficial cLbqk;c(Lcmx;)V
-
getContainerName
- Specified by:
getContainerNamein classLockableContainerBlockEntity- Mappings:
Namespace Name Mixin selector named getContainerNameLnet/minecraft/block/entity/LockableContainerBlockEntity;getContainerName()Lnet/minecraft/text/Text;intermediary method_17823Lnet/minecraft/class_2624;method_17823()Lnet/minecraft/class_2561;official kLdqb;k()Lwz;
-
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.
nbtmight 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:
readNbtin classLockableContainerBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector named readNbtLnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vofficial aLdqh;a(Lub;Ljo$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:
writeNbtin classLockableContainerBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector named writeNbtLnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vofficial bLdqh;b(Lub;Ljo$a;)V
-
readInventoryNbt
- Mappings:
Namespace Name Mixin selector named readInventoryNbtLnet/minecraft/block/entity/ShulkerBoxBlockEntity;readInventoryNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Vintermediary method_11319Lnet/minecraft/class_2627;method_11319(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vofficial eLdrr;e(Lub;Ljo$a;)V
-
getHeldStacks
- Specified by:
getHeldStacksin classLockableContainerBlockEntity- Mappings:
Namespace Name Mixin selector named getHeldStacksLnet/minecraft/block/entity/LockableContainerBlockEntity;getHeldStacks()Lnet/minecraft/util/collection/DefaultedList;intermediary method_11282Lnet/minecraft/class_2624;method_11282()Lnet/minecraft/class_2371;official jLdqb;j()Ljv;
-
setHeldStacks
- Specified by:
setHeldStacksin classLockableContainerBlockEntity- Mappings:
Namespace Name Mixin selector named setHeldStacksLnet/minecraft/block/entity/LockableContainerBlockEntity;setHeldStacks(Lnet/minecraft/util/collection/DefaultedList;)Vintermediary method_11281Lnet/minecraft/class_2624;method_11281(Lnet/minecraft/class_2371;)Vofficial aLdqb;a(Ljv;)V
-
getAvailableSlots
Returns the available slot positions that are reachable from a given side.- Specified by:
getAvailableSlotsin interfaceSidedInventory- Returns:
- the available slot positions that are reachable from a given side
- Mappings:
Namespace Name Mixin selector named getAvailableSlotsLnet/minecraft/inventory/SidedInventory;getAvailableSlots(Lnet/minecraft/util/math/Direction;)[Iintermediary method_5494Lnet/minecraft/class_1278;method_5494(Lnet/minecraft/class_2350;)[Iofficial aLbrd;a(Lji;)[I
-
canInsert
Returns whether the given stack can be inserted into this inventory at the specified slot position from the given direction.- Specified by:
canInsertin 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 canInsertLnet/minecraft/inventory/SidedInventory;canInsert(ILnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/Direction;)Zintermediary method_5492Lnet/minecraft/class_1278;method_5492(ILnet/minecraft/class_1799;Lnet/minecraft/class_2350;)Zofficial aLbrd;a(ILcuq;Lji;)Z
-
canExtract
Returns whether the given stack can be removed from this inventory at the specified slot position from the given direction.- Specified by:
canExtractin 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 canExtractLnet/minecraft/inventory/SidedInventory;canExtract(ILnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/Direction;)Zintermediary method_5493Lnet/minecraft/class_1278;method_5493(ILnet/minecraft/class_1799;Lnet/minecraft/class_2350;)Zofficial bLbrd;b(ILcuq;Lji;)Z
-
getAnimationProgress
public float getAnimationProgress(float delta) - Mappings:
Namespace Name Mixin selector named getAnimationProgressLnet/minecraft/block/entity/ShulkerBoxBlockEntity;getAnimationProgress(F)Fintermediary method_11312Lnet/minecraft/class_2627;method_11312(F)Fofficial aLdrr;a(F)F
-
getColor
- Mappings:
Namespace Name Mixin selector named getColorLnet/minecraft/block/entity/ShulkerBoxBlockEntity;getColor()Lnet/minecraft/util/DyeColor;intermediary method_11320Lnet/minecraft/class_2627;method_11320()Lnet/minecraft/class_1767;official uLdrr;u()Lcti;
-
createScreenHandler
- Specified by:
createScreenHandlerin classLockableContainerBlockEntity- Mappings:
Namespace Name Mixin selector named createScreenHandlerLnet/minecraft/block/entity/LockableContainerBlockEntity;createScreenHandler(ILnet/minecraft/entity/player/PlayerInventory;)Lnet/minecraft/screen/ScreenHandler;intermediary method_5465Lnet/minecraft/class_2624;method_5465(ILnet/minecraft/class_1661;)Lnet/minecraft/class_1703;official aLdqb;a(ILcmw;)Lcpu;
-
suffocates
public boolean suffocates()- Mappings:
Namespace Name Mixin selector named suffocatesLnet/minecraft/block/entity/ShulkerBoxBlockEntity;suffocates()Zintermediary method_27093Lnet/minecraft/class_2627;method_27093()Zofficial vLdrr;v()Z
-