Class ComparatorBlockEntity

java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.ComparatorBlockEntity

public class ComparatorBlockEntity extends BlockEntity
Mappings:
Namespace Name
official czy
intermediary net/minecraft/class_2599
named net/minecraft/block/entity/ComparatorBlockEntity
  • Field Details

    • outputSignal

      private int outputSignal
      Mappings:
      Namespace Name Mixin selector
      official a Lczy;a:I
      intermediary field_11943 Lnet/minecraft/class_2599;field_11943:I
      named outputSignal Lnet/minecraft/block/entity/ComparatorBlockEntity;outputSignal:I
  • Constructor Details

    • ComparatorBlockEntity

      public ComparatorBlockEntity(BlockPos pos, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lczy;<init>(Lgu;Ldcb;)V
      intermediary <init> Lnet/minecraft/class_2599;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
      named <init> Lnet/minecraft/block/entity/ComparatorBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
  • Method Details

    • 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 Lczn;b(Lqr;)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
    • 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 Lczn;a(Lqr;)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
    • getOutputSignal

      public int getOutputSignal()
      Mappings:
      Namespace Name Mixin selector
      official c Lczy;c()I
      intermediary method_11071 Lnet/minecraft/class_2599;method_11071()I
      named getOutputSignal Lnet/minecraft/block/entity/ComparatorBlockEntity;getOutputSignal()I
    • setOutputSignal

      public void setOutputSignal(int outputSignal)
      Mappings:
      Namespace Name Mixin selector
      official a Lczy;a(I)V
      intermediary method_11070 Lnet/minecraft/class_2599;method_11070(I)V
      named setOutputSignal Lnet/minecraft/block/entity/ComparatorBlockEntity;setOutputSignal(I)V