Class CampfireBlockEntity

java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.CampfireBlockEntity
All Implemented Interfaces:
Clearable

public class CampfireBlockEntity extends BlockEntity implements Clearable
Mappings:
Namespace Name
named net/minecraft/block/entity/CampfireBlockEntity
intermediary net/minecraft/class_3924
official dvc
  • Field Details

    • field_31330

      private static final int field_31330
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_31330 Lnet/minecraft/block/entity/CampfireBlockEntity;field_31330:I
      intermediary field_31330 Lnet/minecraft/class_3924;field_31330:I
      official a Ldvc;a:I
    • field_31331

      private static final int field_31331
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_31331 Lnet/minecraft/block/entity/CampfireBlockEntity;field_31331:I
      intermediary field_31331 Lnet/minecraft/class_3924;field_31331:I
      official b Ldvc;b:I
    • itemsBeingCooked

      private final DefaultedList<ItemStack> itemsBeingCooked
      Mappings:
      Namespace Name Mixin selector
      named itemsBeingCooked Lnet/minecraft/block/entity/CampfireBlockEntity;itemsBeingCooked:Lnet/minecraft/util/collection/DefaultedList;
      intermediary field_17383 Lnet/minecraft/class_3924;field_17383:Lnet/minecraft/class_2371;
      official c Ldvc;c:Ljz;
    • cookingTimes

      private final int[] cookingTimes
      Mappings:
      Namespace Name Mixin selector
      named cookingTimes Lnet/minecraft/block/entity/CampfireBlockEntity;cookingTimes:[I
      intermediary field_17384 Lnet/minecraft/class_3924;field_17384:[I
      official d Ldvc;d:[I
    • cookingTotalTimes

      private final int[] cookingTotalTimes
      Mappings:
      Namespace Name Mixin selector
      named cookingTotalTimes Lnet/minecraft/block/entity/CampfireBlockEntity;cookingTotalTimes:[I
      intermediary field_17385 Lnet/minecraft/class_3924;field_17385:[I
      official e Ldvc;e:[I
  • Constructor Details

    • CampfireBlockEntity

      public CampfireBlockEntity(BlockPos pos, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/block/entity/CampfireBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
      intermediary <init> Lnet/minecraft/class_3924;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
      official <init> Ldvc;<init>(Ljh;Ldxu;)V
  • Method Details

    • litServerTick

      public static void litServerTick(ServerWorld world, BlockPos pos, BlockState state, CampfireBlockEntity blockEntity, ServerRecipeManager.MatchGetter<SingleStackRecipeInput,CampfireCookingRecipe> recipeMatchGetter)
      Mappings:
      Namespace Name Mixin selector
      named litServerTick Lnet/minecraft/block/entity/CampfireBlockEntity;litServerTick(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/CampfireBlockEntity;Lnet/minecraft/recipe/ServerRecipeManager$MatchGetter;)V
      intermediary method_31666 Lnet/minecraft/class_3924;method_31666(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_3924;Lnet/minecraft/class_1863$class_7266;)V
      official a Ldvc;a(Lash;Ljh;Ldxu;Ldvc;Ldck$a;)V
    • unlitServerTick

      public static void unlitServerTick(World world, BlockPos pos, BlockState state, CampfireBlockEntity campfire)
      Mappings:
      Namespace Name Mixin selector
      named unlitServerTick Lnet/minecraft/block/entity/CampfireBlockEntity;unlitServerTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/CampfireBlockEntity;)V
      intermediary method_31667 Lnet/minecraft/class_3924;method_31667(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_3924;)V
      official a Ldvc;a(Ldhh;Ljh;Ldxu;Ldvc;)V
    • clientTick

      public static void clientTick(World world, BlockPos pos, BlockState state, CampfireBlockEntity campfire)
      Mappings:
      Namespace Name Mixin selector
      named clientTick Lnet/minecraft/block/entity/CampfireBlockEntity;clientTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/CampfireBlockEntity;)V
      intermediary method_31668 Lnet/minecraft/class_3924;method_31668(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_3924;)V
      official b Ldvc;b(Ldhh;Ljh;Ldxu;Ldvc;)V
    • getItemsBeingCooked

      public DefaultedList<ItemStack> getItemsBeingCooked()
      Mappings:
      Namespace Name Mixin selector
      named getItemsBeingCooked Lnet/minecraft/block/entity/CampfireBlockEntity;getItemsBeingCooked()Lnet/minecraft/util/collection/DefaultedList;
      intermediary method_17505 Lnet/minecraft/class_3924;method_17505()Lnet/minecraft/class_2371;
      official b Ldvc;b()Ljz;
    • 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 BlockEntity
      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

      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 BlockEntity
      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
    • 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, 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/block/entity/CampfireBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;
      intermediary method_38245 Lnet/minecraft/class_3924;method_38245()Lnet/minecraft/class_2622;
      official c Ldvc;c()Lacy;
    • 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, 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 Lduw;a(Ljs$a;)Lux;
    • addItem

      public boolean addItem(ServerWorld world, @Nullable @Nullable LivingEntity entity, ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named addItem Lnet/minecraft/block/entity/CampfireBlockEntity;addItem(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)Z
      intermediary method_17503 Lnet/minecraft/class_3924;method_17503(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)Z
      official a Ldvc;a(Lash;Lbwf;Lcxo;)Z
    • updateListeners

      private void updateListeners()
      Mappings:
      Namespace Name Mixin selector
      named updateListeners Lnet/minecraft/block/entity/CampfireBlockEntity;updateListeners()V
      intermediary method_17510 Lnet/minecraft/class_3924;method_17510()V
      official f Ldvc;f()V
    • clear

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

      public void spawnItemsBeingCooked()
      Mappings:
      Namespace Name Mixin selector
      named spawnItemsBeingCooked Lnet/minecraft/block/entity/CampfireBlockEntity;spawnItemsBeingCooked()V
      intermediary method_17506 Lnet/minecraft/class_3924;method_17506()V
      official d Ldvc;d()V
    • readComponents

      protected void readComponents(BlockEntity.ComponentsAccess components)
      Overrides:
      readComponents in class BlockEntity
      Mappings:
      Namespace Name Mixin selector
      named readComponents Lnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/block/entity/BlockEntity$ComponentsAccess;)V
      intermediary method_57568 Lnet/minecraft/class_2586;method_57568(Lnet/minecraft/class_2586$class_9473;)V
      official a Lduw;a(Lduw$b;)V
    • addComponents

      protected void addComponents(ComponentMap.Builder builder)
      Overrides:
      addComponents in class BlockEntity
      Mappings:
      Namespace Name Mixin selector
      named addComponents Lnet/minecraft/block/entity/BlockEntity;addComponents(Lnet/minecraft/component/ComponentMap$Builder;)V
      intermediary method_57567 Lnet/minecraft/class_2586;method_57567(Lnet/minecraft/class_9323$class_9324;)V
      official a Lduw;a(Lkq$a;)V
    • removeFromCopiedStackNbt

      public void removeFromCopiedStackNbt(NbtCompound nbt)
      Overrides:
      removeFromCopiedStackNbt in class BlockEntity
      Mappings:
      Namespace Name Mixin selector
      named removeFromCopiedStackNbt Lnet/minecraft/block/entity/BlockEntity;removeFromCopiedStackNbt(Lnet/minecraft/nbt/NbtCompound;)V
      intermediary method_57569 Lnet/minecraft/class_2586;method_57569(Lnet/minecraft/class_2487;)V
      official a Lduw;a(Lux;)V