Package net.minecraft

Class class_11072

All Implemented Interfaces:
Iterable<ItemStack>, Inventory, RecipeInputProvider, NamedScreenHandlerFactory, ScreenHandlerFactory, Clearable, Nameable

public class class_11072 extends LockableContainerBlockEntity implements RecipeInputProvider
Mappings:
Namespace Name
named net/minecraft/class_11072
intermediary net/minecraft/class_11072
official ecv
  • Field Details

    • field_58958

      public static final int field_58958
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_58958 Lnet/minecraft/class_11072;field_58958:I
      intermediary field_58958 Lnet/minecraft/class_11072;field_58958:I
      official b Lecv;b:I
    • field_58959

      public static final int field_58959
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_58959 Lnet/minecraft/class_11072;field_58959:I
      intermediary field_58959 Lnet/minecraft/class_11072;field_58959:I
      official c Lecv;c:I
    • field_58960

      public static final int field_58960
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_58960 Lnet/minecraft/class_11072;field_58960:I
      intermediary field_58960 Lnet/minecraft/class_11072;field_58960:I
      official d Lecv;d:I
    • field_58961

      protected DefaultedList<ItemStack> field_58961
      Mappings:
      Namespace Name Mixin selector
      named field_58961 Lnet/minecraft/class_11072;field_58961:Lnet/minecraft/util/collection/DefaultedList;
      intermediary field_58961 Lnet/minecraft/class_11072;field_58961:Lnet/minecraft/class_2371;
      official e Lecv;e:Ljq;
    • field_58962

      @Nullable private @Nullable BlockPos field_58962
      Mappings:
      Namespace Name Mixin selector
      named field_58962 Lnet/minecraft/class_11072;field_58962:Lnet/minecraft/util/math/BlockPos;
      intermediary field_58962 Lnet/minecraft/class_11072;field_58962:Lnet/minecraft/class_2338;
      official f Lecv;f:Lix;
    • field_58963

      private int field_58963
      Mappings:
      Namespace Name Mixin selector
      named field_58963 Lnet/minecraft/class_11072;field_58963:I
      intermediary field_58963 Lnet/minecraft/class_11072;field_58963:I
      official g Lecv;g:I
  • Constructor Details

  • Method Details

    • method_69738

      public static int method_69738(int int2)
      Mappings:
      Namespace Name Mixin selector
      named method_69738 Lnet/minecraft/class_11072;method_69738(I)I
      intermediary method_69738 Lnet/minecraft/class_11072;method_69738(I)I
      official c Lecv;c(I)I
    • method_69739

      public static int method_69739(int int2)
      Mappings:
      Namespace Name Mixin selector
      named method_69739 Lnet/minecraft/class_11072;method_69739(I)I
      intermediary method_69739 Lnet/minecraft/class_11072;method_69739(I)I
      official d Lecv;d(I)I
    • method_69740

      public static int method_69740(int int2)
      Mappings:
      Namespace Name Mixin selector
      named method_69740 Lnet/minecraft/class_11072;method_69740(I)I
      intermediary method_69740 Lnet/minecraft/class_11072;method_69740(I)I
      official e Lecv;e(I)I
    • readNbt

      protected void readNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registries)
      Reads data from nbt. 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 class LockableContainerBlockEntity
      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 Lebn;a(Luc;Ljj$a;)V
    • writeNbt

      protected void writeNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registries)
      Writes data to nbt. 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 class LockableContainerBlockEntity
      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 Lebn;b(Luc;Ljj$a;)V
    • toUpdatePacket

      Description copied from class: BlockEntity
      Returns the packet to send to nearby players when the block entity's observable state changes, or null to not send the packet.

      If the data returned by initial chunk data is suitable for updates, the following shortcut can be used to create an update packet: BlockEntityUpdateS2CPacket.create(this). The NBT will be passed to BlockEntity.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:
      toUpdatePacket in class BlockEntity
      Returns:
      the packet to send to nearby players when the block entity's observable state changes, or null to not send the packet
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named toUpdatePacket Lnet/minecraft/class_11072;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;
      intermediary method_69741 Lnet/minecraft/class_11072;method_69741()Lnet/minecraft/class_2622;
      official h Lecv;h()Lacn;
    • toInitialChunkDataNbt

      public NbtCompound toInitialChunkDataNbt(RegistryWrapper.WrapperLookup registries)
      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 default BlockEntityUpdateS2CPacket.

      "Observable state" is a state that clients can observe without specific interaction. For example,

      invalid reference
      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 send all NBT data of this block entity saved to disk, return BlockEntity.createNbt(net.minecraft.registry.RegistryWrapper.WrapperLookup).

      Overrides:
      toInitialChunkDataNbt in class BlockEntity
      Returns:
      the serialized state of this block entity that is observable by clients
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named toInitialChunkDataNbt Lnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;
      intermediary method_16887 Lnet/minecraft/class_2586;method_16887(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;
      official a Lebn;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_69736 Lnet/minecraft/class_11072;method_69736(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/class_11072;)V
      intermediary method_69736 Lnet/minecraft/class_11072;method_69736(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_11072;)V
      official a Lecv;a(Ldmy;Lix;Lees;Lecv;)V
    • size

      public int size()
      Returns the size of the inventory.

      The inventory should support the slot ID from 0 to size() - 1. This should remain constant throughout the inventory's lifetime.

      Specified by:
      size in interface Inventory
      Returns:
      the size of the inventory
      Mappings:
      Namespace Name Mixin selector
      named size Lnet/minecraft/inventory/Inventory;size()I
      intermediary method_5439 Lnet/minecraft/class_1263;method_5439()I
      official b Lbvu;b()I
    • getHeldStacks

      protected DefaultedList<ItemStack> getHeldStacks()
      Specified by:
      getHeldStacks in class LockableContainerBlockEntity
      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 g Lebg;g()Ljq;
    • setHeldStacks

      protected void setHeldStacks(DefaultedList<ItemStack> inventory)
      Specified by:
      setHeldStacks in class LockableContainerBlockEntity
      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 Lebg;a(Ljq;)V
    • setStack

      public void setStack(int slot, ItemStack stack)
      Sets the stack stored at slot to stack.
      Specified by:
      setStack in interface Inventory
      Overrides:
      setStack in class LockableContainerBlockEntity
      Mappings:
      Namespace Name Mixin selector
      named setStack Lnet/minecraft/inventory/Inventory;setStack(ILnet/minecraft/item/ItemStack;)V
      intermediary method_5447 Lnet/minecraft/class_1263;method_5447(ILnet/minecraft/class_1799;)V
      official a Lbvu;a(ILdcs;)V
    • isValid

      public boolean isValid(int slot, ItemStack stack)
      Returns whether stack is valid for the slot.

      Implementations can, for example, use this to check whether the item is in a specific tag. This returns true by default.

      Specified by:
      isValid in interface Inventory
      Returns:
      whether stack is valid for the slot
      Mappings:
      Namespace Name Mixin selector
      named isValid Lnet/minecraft/inventory/Inventory;isValid(ILnet/minecraft/item/ItemStack;)Z
      intermediary method_5437 Lnet/minecraft/class_1263;method_5437(ILnet/minecraft/class_1799;)Z
      official b Lbvu;b(ILdcs;)Z
    • provideRecipeInputs

      public void provideRecipeInputs(RecipeFinder finder)
      Specified by:
      provideRecipeInputs in interface RecipeInputProvider
      Mappings:
      Namespace Name Mixin selector
      named provideRecipeInputs Lnet/minecraft/recipe/RecipeInputProvider;provideRecipeInputs(Lnet/minecraft/recipe/RecipeFinder;)V
      intermediary method_7683 Lnet/minecraft/class_1737;method_7683(Lnet/minecraft/class_9875;)V
      official fillStackedContents Ldak;fillStackedContents(Lcul;)V
    • getContainerName

      protected Text getContainerName()
      Specified by:
      getContainerName in class LockableContainerBlockEntity
      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 k Lebg;k()Lxi;
    • createScreenHandler

      protected ScreenHandler createScreenHandler(int syncId, PlayerInventory playerInventory)
      Specified by:
      createScreenHandler in class LockableContainerBlockEntity
      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 Lebg;a(ILcue;)Lcxy;
    • method_69735

      private void method_69735(World world, BlockPos blockPos, RegistryKey<DimensionOptions> registryKey)
      Mappings:
      Namespace Name Mixin selector
      named method_69735 Lnet/minecraft/class_11072;method_69735(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/registry/RegistryKey;)V
      intermediary method_69735 Lnet/minecraft/class_11072;method_69735(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_5321;)V
      official a Lecv;a(Ldmy;Lix;Lama;)V
    • method_69733

      public static List<Integer> method_69733(ServerWorld serverWorld)
      Mappings:
      Namespace Name Mixin selector
      named method_69733 Lnet/minecraft/class_11072;method_69733(Lnet/minecraft/server/world/ServerWorld;)Ljava/util/List;
      intermediary method_69733 Lnet/minecraft/class_11072;method_69733(Lnet/minecraft/class_3218;)Ljava/util/List;
      official a Lecv;a(Last;)Ljava/util/List;
    • method_69260

      public List<Integer> method_69260()
      Specified by:
      method_69260 in interface NamedScreenHandlerFactory
      Mappings:
      Namespace Name Mixin selector
      named method_69260 Lnet/minecraft/screen/NamedScreenHandlerFactory;method_69260()Ljava/util/List;
      intermediary method_69260 Lnet/minecraft/class_3908;method_69260()Ljava/util/List;
      official al_ Lbwd;al_()Ljava/util/List;
    • onBlockReplaced

      public void onBlockReplaced(BlockPos pos, BlockState oldState)
      Overrides:
      onBlockReplaced in class BlockEntity
      Mappings:
      Namespace Name Mixin selector
      named onBlockReplaced Lnet/minecraft/block/entity/BlockEntity;onBlockReplaced(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
      intermediary method_66473 Lnet/minecraft/class_2586;method_66473(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
      official a Lebn;a(Lix;Lees;)V
    • method_69734

      public void method_69734(ServerWorld serverWorld, BlockPos blockPos)
      Mappings:
      Namespace Name Mixin selector
      named method_69734 Lnet/minecraft/class_11072;method_69734(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;)V
      intermediary method_69734 Lnet/minecraft/class_11072;method_69734(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;)V
      official a Lecv;a(Last;Lix;)V