Class JukeboxBlockEntity

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

public class JukeboxBlockEntity extends BlockEntity implements Clearable
Mappings:
Namespace Name
official cxh
intermediary net/minecraft/class_2619
named net/minecraft/block/entity/JukeboxBlockEntity
  • Field Details

    • record

      private ItemStack record
      Mappings:
      Namespace Name Mixin selector
      official a Lcxh;a:Lcdt;
      intermediary field_12031 Lnet/minecraft/class_2619;field_12031:Lnet/minecraft/class_1799;
      named record Lnet/minecraft/block/entity/JukeboxBlockEntity;record:Lnet/minecraft/item/ItemStack;
    • ticksThisSecond

      private int ticksThisSecond
      Mappings:
      Namespace Name Mixin selector
      official b Lcxh;b:I
      intermediary field_39481 Lnet/minecraft/class_2619;field_39481:I
      named ticksThisSecond Lnet/minecraft/block/entity/JukeboxBlockEntity;ticksThisSecond:I
    • tickCount

      private long tickCount
      Mappings:
      Namespace Name Mixin selector
      official c Lcxh;c:J
      intermediary field_39482 Lnet/minecraft/class_2619;field_39482:J
      named tickCount Lnet/minecraft/block/entity/JukeboxBlockEntity;tickCount:J
    • recordStartTick

      private long recordStartTick
      Mappings:
      Namespace Name Mixin selector
      official d Lcxh;d:J
      intermediary field_39483 Lnet/minecraft/class_2619;field_39483:J
      named recordStartTick Lnet/minecraft/block/entity/JukeboxBlockEntity;recordStartTick:J
    • isPlaying

      private boolean isPlaying
      Mappings:
      Namespace Name Mixin selector
      official e Lcxh;e:Z
      intermediary field_39484 Lnet/minecraft/class_2619;field_39484:Z
      named isPlaying Lnet/minecraft/block/entity/JukeboxBlockEntity;isPlaying:Z
  • Constructor Details

    • JukeboxBlockEntity

      public JukeboxBlockEntity(BlockPos pos, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcxh;<init>(Lgp;Lcyt;)V
      intermediary <init> Lnet/minecraft/class_2619;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
      named <init> Lnet/minecraft/block/entity/JukeboxBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
  • Method Details

    • 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 Lcwl;a(Lqp;)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 Lcwl;b(Lqp;)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
    • getRecord

      public ItemStack getRecord()
      Mappings:
      Namespace Name Mixin selector
      official c Lcxh;c()Lcdt;
      intermediary method_11275 Lnet/minecraft/class_2619;method_11275()Lnet/minecraft/class_1799;
      named getRecord Lnet/minecraft/block/entity/JukeboxBlockEntity;getRecord()Lnet/minecraft/item/ItemStack;
    • setRecord

      public void setRecord(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official a Lcxh;a(Lcdt;)V
      intermediary method_11276 Lnet/minecraft/class_2619;method_11276(Lnet/minecraft/class_1799;)V
      named setRecord Lnet/minecraft/block/entity/JukeboxBlockEntity;setRecord(Lnet/minecraft/item/ItemStack;)V
    • startPlaying

      public void startPlaying()
      Mappings:
      Namespace Name Mixin selector
      official d Lcxh;d()V
      intermediary method_44374 Lnet/minecraft/class_2619;method_44374()V
      named startPlaying Lnet/minecraft/block/entity/JukeboxBlockEntity;startPlaying()V
    • clear

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

      public static void tick(World world, BlockPos pos, BlockState state, JukeboxBlockEntity blockEntity)
      Mappings:
      Namespace Name Mixin selector
      official a Lcxh;a(Lcjw;Lgp;Lcyt;Lcxh;)V
      intermediary method_44370 Lnet/minecraft/class_2619;method_44370(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2619;)V
      named tick Lnet/minecraft/block/entity/JukeboxBlockEntity;tick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/JukeboxBlockEntity;)V
    • isPlayingRecord

      private static boolean isPlayingRecord(BlockState state, JukeboxBlockEntity blockEntity)
      Mappings:
      Namespace Name Mixin selector
      official a Lcxh;a(Lcyt;Lcxh;)Z
      intermediary method_44373 Lnet/minecraft/class_2619;method_44373(Lnet/minecraft/class_2680;Lnet/minecraft/class_2619;)Z
      named isPlayingRecord Lnet/minecraft/block/entity/JukeboxBlockEntity;isPlayingRecord(Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/JukeboxBlockEntity;)Z
    • isSongFinished

      private static boolean isSongFinished(JukeboxBlockEntity blockEntity, MusicDiscItem musicDisc)
      Mappings:
      Namespace Name Mixin selector
      official a Lcxh;a(Lcxh;Lcel;)Z
      intermediary method_44372 Lnet/minecraft/class_2619;method_44372(Lnet/minecraft/class_2619;Lnet/minecraft/class_1813;)Z
      named isSongFinished Lnet/minecraft/block/entity/JukeboxBlockEntity;isSongFinished(Lnet/minecraft/block/entity/JukeboxBlockEntity;Lnet/minecraft/item/MusicDiscItem;)Z
    • hasSecondPassed

      private static boolean hasSecondPassed(JukeboxBlockEntity blockEntity)
      Mappings:
      Namespace Name Mixin selector
      official a Lcxh;a(Lcxh;)Z
      intermediary method_44371 Lnet/minecraft/class_2619;method_44371(Lnet/minecraft/class_2619;)Z
      named hasSecondPassed Lnet/minecraft/block/entity/JukeboxBlockEntity;hasSecondPassed(Lnet/minecraft/block/entity/JukeboxBlockEntity;)Z