Package net.minecraft

Class class_7716

All Implemented Interfaces:
Clearable

public class class_7716 extends BlockEntity implements Clearable
Mappings:
Namespace Name
official cvt
intermediary net/minecraft/class_7716
named net/minecraft/class_7716
  • Field Details

    • field_40331

      public static final int field_40331
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lcvt;a:I
      intermediary field_40331 Lnet/minecraft/class_7716;field_40331:I
      named field_40331 Lnet/minecraft/class_7716;field_40331:I
    • field_40332

      private final Deque<ItemStack> field_40332
      Mappings:
      Namespace Name Mixin selector
      official b Lcvt;b:Ljava/util/Deque;
      intermediary field_40332 Lnet/minecraft/class_7716;field_40332:Ljava/util/Deque;
      named field_40332 Lnet/minecraft/class_7716;field_40332:Ljava/util/Deque;
  • Constructor Details

  • Method Details

    • method_45464

      public ItemStack method_45464()
      Mappings:
      Namespace Name Mixin selector
      official c Lcvt;c()Lccw;
      intermediary method_45464 Lnet/minecraft/class_7716;method_45464()Lnet/minecraft/class_1799;
      named method_45464 Lnet/minecraft/class_7716;method_45464()Lnet/minecraft/item/ItemStack;
    • method_45462

      public void method_45462(ItemStack itemStack)
      Mappings:
      Namespace Name Mixin selector
      official a Lcvt;a(Lccw;)V
      intermediary method_45462 Lnet/minecraft/class_7716;method_45462(Lnet/minecraft/class_1799;)V
      named method_45462 Lnet/minecraft/class_7716;method_45462(Lnet/minecraft/item/ItemStack;)V
    • readNbt

      public void readNbt(NbtCompound nbt)
      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 BlockEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lcvm;a(Lqf;)V
      intermediary method_11014 Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;)V
      named readNbt Lnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;)V
    • writeNbt

      protected void writeNbt(NbtCompound nbt)
      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 BlockEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lcvm;b(Lqf;)V
      intermediary method_11007 Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;)V
      named writeNbt Lnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;)V
    • method_45463

      private static DefaultedList<ItemStack> method_45463(Collection<ItemStack> collection)
      Mappings:
      Namespace Name Mixin selector
      official a Lcvt;a(Ljava/util/Collection;)Lhh;
      intermediary method_45463 Lnet/minecraft/class_7716;method_45463(Ljava/util/Collection;)Lnet/minecraft/class_2371;
      named method_45463 Lnet/minecraft/class_7716;method_45463(Ljava/util/Collection;)Lnet/minecraft/util/collection/DefaultedList;
    • toUpdatePacket

      public BlockEntityUpdateS2CPacket 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) 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
      official d Lcvt;d()Lui;
      intermediary method_45465 Lnet/minecraft/class_7716;method_45465()Lnet/minecraft/class_2622;
      named toUpdatePacket Lnet/minecraft/class_7716;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;
    • toInitialChunkDataNbt

      public NbtCompound 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 BlockEntity.toUpdatePacket() and decides to use the default BlockEntityUpdateS2CPacket.

      "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 send all NBT data of this block entity saved to disk, return BlockEntity.createNbt().

      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
      official ac_ Lcvm;ac_()Lqf;
      intermediary method_16887 Lnet/minecraft/class_2586;method_16887()Lnet/minecraft/class_2487;
      named toInitialChunkDataNbt Lnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt()Lnet/minecraft/nbt/NbtCompound;
    • clear

      public void clear()
      Specified by:
      clear in interface Clearable
      Mappings:
      Namespace Name Mixin selector
      official a Lbbl;a()V
      intermediary method_5448 Lnet/minecraft/class_3829;method_5448()V
      named clear Lnet/minecraft/util/Clearable;clear()V
    • method_45466

      public int method_45466()
      Mappings:
      Namespace Name Mixin selector
      official f Lcvt;f()I
      intermediary method_45466 Lnet/minecraft/class_7716;method_45466()I
      named method_45466 Lnet/minecraft/class_7716;method_45466()I
    • method_45467

      public boolean method_45467()
      Mappings:
      Namespace Name Mixin selector
      official g Lcvt;g()Z
      intermediary method_45467 Lnet/minecraft/class_7716;method_45467()Z
      named method_45467 Lnet/minecraft/class_7716;method_45467()Z
    • method_45468

      public boolean method_45468()
      Mappings:
      Namespace Name Mixin selector
      official i Lcvt;i()Z
      intermediary method_45468 Lnet/minecraft/class_7716;method_45468()Z
      named method_45468 Lnet/minecraft/class_7716;method_45468()Z