Class class_11072
- All Implemented Interfaces:
Iterable<ItemStack>,Inventory,RecipeInputProvider,NamedScreenHandlerFactory,ScreenHandlerFactory,Clearable,Nameable
- Mappings:
Namespace Name named net/minecraft/class_11072intermediary net/minecraft/class_11072official ecv
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.inventory.Inventory
Inventory.Iterator -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intprotected DefaultedList<ItemStack> private intFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, worldFields inherited from interface net.minecraft.inventory.Inventory
DEFAULT_MAX_INTERACTION_RANGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ScreenHandlercreateScreenHandler(int syncId, PlayerInventory playerInventory) protected Textprotected DefaultedList<ItemStack> booleanReturns whetherstackis valid for theslot.method_69733(ServerWorld serverWorld) voidmethod_69734(ServerWorld serverWorld, BlockPos blockPos) private voidmethod_69735(World world, BlockPos blockPos, RegistryKey<DimensionOptions> registryKey) static voidmethod_69736(World world, BlockPos blockPos, BlockState blockState, class_11072 class_11072) static intmethod_69738(int int2) static intmethod_69739(int int2) static intmethod_69740(int int2) voidonBlockReplaced(BlockPos pos, BlockState oldState) voidprovideRecipeInputs(RecipeFinder finder) protected voidreadNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registries) Reads data fromnbt.protected voidsetHeldStacks(DefaultedList<ItemStack> inventory) voidSets the stack stored atslottostack.intsize()Returns the size of the inventory.toInitialChunkDataNbt(RegistryWrapper.WrapperLookup registries) Returns the serialized state of this block entity that is observable by clients.Returns the packet to send to nearby players when the block entity's observable state changes, ornullto not send the packet.protected voidwriteNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registries) Writes data tonbt.Methods inherited from class net.minecraft.block.entity.LockableContainerBlockEntity
addComponents, canPlayerUse, checkUnlocked, checkUnlocked, clear, createMenu, getCustomName, getDisplayName, getName, getStack, isEmpty, readComponents, removeFromCopiedStackNbt, removeStack, removeStackMethods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, createComponentlessNbt, createComponentlessNbtWithIdentifyingData, createComponentMap, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getComponents, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, read, readComponentlessNbt, readComponents, readComponents, setCachedState, setComponents, setWorld, supports, 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
canTransferTo, containsAny, containsAny, count, getMaxCount, getMaxCountPerStack, iterator, markDirty, method_69259, onClose, onOpenMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface net.minecraft.util.Nameable
hasCustomName
-
Field Details
-
field_58958
public static final int field_58958- See Also:
- Mappings:
Namespace Name Mixin selector named field_58958Lnet/minecraft/class_11072;field_58958:Iintermediary field_58958Lnet/minecraft/class_11072;field_58958:Iofficial bLecv;b:I
-
field_58959
public static final int field_58959- See Also:
- Mappings:
Namespace Name Mixin selector named field_58959Lnet/minecraft/class_11072;field_58959:Iintermediary field_58959Lnet/minecraft/class_11072;field_58959:Iofficial cLecv;c:I
-
field_58960
public static final int field_58960- See Also:
- Mappings:
Namespace Name Mixin selector named field_58960Lnet/minecraft/class_11072;field_58960:Iintermediary field_58960Lnet/minecraft/class_11072;field_58960:Iofficial dLecv;d:I
-
field_58961
- Mappings:
Namespace Name Mixin selector named field_58961Lnet/minecraft/class_11072;field_58961:Lnet/minecraft/util/collection/DefaultedList;intermediary field_58961Lnet/minecraft/class_11072;field_58961:Lnet/minecraft/class_2371;official eLecv;e:Ljq;
-
field_58962
- Mappings:
Namespace Name Mixin selector named field_58962Lnet/minecraft/class_11072;field_58962:Lnet/minecraft/util/math/BlockPos;intermediary field_58962Lnet/minecraft/class_11072;field_58962:Lnet/minecraft/class_2338;official fLecv;f:Lix;
-
field_58963
private int field_58963- Mappings:
Namespace Name Mixin selector named field_58963Lnet/minecraft/class_11072;field_58963:Iintermediary field_58963Lnet/minecraft/class_11072;field_58963:Iofficial gLecv;g:I
-
-
Constructor Details
-
class_11072
-
-
Method Details
-
method_69738
public static int method_69738(int int2) - Mappings:
Namespace Name Mixin selector named method_69738Lnet/minecraft/class_11072;method_69738(I)Iintermediary method_69738Lnet/minecraft/class_11072;method_69738(I)Iofficial cLecv;c(I)I
-
method_69739
public static int method_69739(int int2) - Mappings:
Namespace Name Mixin selector named method_69739Lnet/minecraft/class_11072;method_69739(I)Iintermediary method_69739Lnet/minecraft/class_11072;method_69739(I)Iofficial dLecv;d(I)I
-
method_69740
public static int method_69740(int int2) - Mappings:
Namespace Name Mixin selector named method_69740Lnet/minecraft/class_11072;method_69740(I)Iintermediary method_69740Lnet/minecraft/class_11072;method_69740(I)Iofficial eLecv;e(I)I
-
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 aLebn;a(Luc;Ljj$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 bLebn;b(Luc;Ljj$a;)V
-
toUpdatePacket
Description copied from class:BlockEntityReturns the packet to send to nearby players when the block entity's observable state changes, ornullto not send the packet.If the data returned by
initial chunk datais suitable for updates, the following shortcut can be used to create an update packet:BlockEntityUpdateS2CPacket.create(this). The NBT will be passed toBlockEntity.readNbt(net.minecraft.nbt.NbtCompound, net.minecraft.registry.RegistryWrapper.WrapperLookup)on the client."Observable state" is a state that clients can observe without specific interaction. For example,
CampfireBlockEntity's cooked items are observable states, but chests' inventories are not observable states, since the player must first open that chest before they can see the contents.To sync block entity data using this method, use
serverWorld.getChunkManager().markForUpdate(this.getPos());.- Overrides:
toUpdatePacketin classBlockEntity- Returns:
- the packet to send to nearby players when the block entity's observable
state changes, or
nullto not send the packet - See Also:
- Mappings:
Namespace Name Mixin selector named toUpdatePacketLnet/minecraft/class_11072;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;intermediary method_69741Lnet/minecraft/class_11072;method_69741()Lnet/minecraft/class_2622;official hLecv;h()Lacn;
-
toInitialChunkDataNbt
Returns the serialized state of this block entity that is observable by clients.This is sent alongside the initial chunk data, as well as when the block entity implements
toUpdatePacket()and decides to use the defaultBlockEntityUpdateS2CPacket."Observable state" is a state that clients can observe without specific interaction. For example,
's cooked items are observable states, but chests' inventories are not observable states, since the player must first open that chest before they can see the contents.invalid reference
CampfireBlockEntityTo send all NBT data of this block entity saved to disk, return
BlockEntity.createNbt(net.minecraft.registry.RegistryWrapper.WrapperLookup).- Overrides:
toInitialChunkDataNbtin classBlockEntity- Returns:
- the serialized state of this block entity that is observable by clients
- See Also:
- Mappings:
Namespace Name Mixin selector named toInitialChunkDataNbtLnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;intermediary method_16887Lnet/minecraft/class_2586;method_16887(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;official aLebn;a(Ljj$a;)Luc;
-
method_69736
public static void method_69736(World world, BlockPos blockPos, BlockState blockState, class_11072 class_11072) - Mappings:
Namespace Name Mixin selector named method_69736Lnet/minecraft/class_11072;method_69736(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/class_11072;)Vintermediary method_69736Lnet/minecraft/class_11072;method_69736(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_11072;)Vofficial aLecv;a(Ldmy;Lix;Lees;Lecv;)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. -
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 gLebg;g()Ljq;
-
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 aLebg;a(Ljq;)V
-
setStack
Sets the stack stored atslottostack.- Specified by:
setStackin interfaceInventory- Overrides:
setStackin classLockableContainerBlockEntity- Mappings:
Namespace Name Mixin selector named setStackLnet/minecraft/inventory/Inventory;setStack(ILnet/minecraft/item/ItemStack;)Vintermediary method_5447Lnet/minecraft/class_1263;method_5447(ILnet/minecraft/class_1799;)Vofficial aLbvu;a(ILdcs;)V
-
isValid
Returns whetherstackis valid for theslot.Implementations can, for example, use this to check whether the item is in a specific tag. This returns
trueby default.- Specified by:
isValidin interfaceInventory- Returns:
- whether
stackis valid for theslot - Mappings:
Namespace Name Mixin selector named isValidLnet/minecraft/inventory/Inventory;isValid(ILnet/minecraft/item/ItemStack;)Zintermediary method_5437Lnet/minecraft/class_1263;method_5437(ILnet/minecraft/class_1799;)Zofficial bLbvu;b(ILdcs;)Z
-
provideRecipeInputs
- Specified by:
provideRecipeInputsin interfaceRecipeInputProvider- Mappings:
Namespace Name Mixin selector named provideRecipeInputsLnet/minecraft/recipe/RecipeInputProvider;provideRecipeInputs(Lnet/minecraft/recipe/RecipeFinder;)Vintermediary method_7683Lnet/minecraft/class_1737;method_7683(Lnet/minecraft/class_9875;)Vofficial fillStackedContentsLdak;fillStackedContents(Lcul;)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 kLebg;k()Lxi;
-
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 aLebg;a(ILcue;)Lcxy;
-
method_69735
private void method_69735(World world, BlockPos blockPos, RegistryKey<DimensionOptions> registryKey) - Mappings:
Namespace Name Mixin selector named method_69735Lnet/minecraft/class_11072;method_69735(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/registry/RegistryKey;)Vintermediary method_69735Lnet/minecraft/class_11072;method_69735(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_5321;)Vofficial aLecv;a(Ldmy;Lix;Lama;)V
-
method_69733
- Mappings:
Namespace Name Mixin selector named method_69733Lnet/minecraft/class_11072;method_69733(Lnet/minecraft/server/world/ServerWorld;)Ljava/util/List;intermediary method_69733Lnet/minecraft/class_11072;method_69733(Lnet/minecraft/class_3218;)Ljava/util/List;official aLecv;a(Last;)Ljava/util/List;
-
method_69260
- Specified by:
method_69260in interfaceNamedScreenHandlerFactory- Mappings:
Namespace Name Mixin selector named method_69260Lnet/minecraft/screen/NamedScreenHandlerFactory;method_69260()Ljava/util/List;intermediary method_69260Lnet/minecraft/class_3908;method_69260()Ljava/util/List;official al_Lbwd;al_()Ljava/util/List;
-
onBlockReplaced
- Overrides:
onBlockReplacedin classBlockEntity- Mappings:
Namespace Name Mixin selector named onBlockReplacedLnet/minecraft/block/entity/BlockEntity;onBlockReplaced(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Vintermediary method_66473Lnet/minecraft/class_2586;method_66473(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial aLebn;a(Lix;Lees;)V
-
method_69734
- Mappings:
Namespace Name Mixin selector named method_69734Lnet/minecraft/class_11072;method_69734(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;)Vintermediary method_69734Lnet/minecraft/class_11072;method_69734(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;)Vofficial aLecv;a(Last;Lix;)V
-