Package net.minecraft.block.entity
Class JukeboxBlockEntity
java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.JukeboxBlockEntity
- All Implemented Interfaces:
Clearable
- Mappings:
Namespace Name official cxh
intermediary net/minecraft/class_2619
named net/minecraft/block/entity/JukeboxBlockEntity
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private ItemStack
private long
private long
private int
Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
private static boolean
hasSecondPassed
(JukeboxBlockEntity blockEntity) private static boolean
isPlayingRecord
(BlockState state, JukeboxBlockEntity blockEntity) private static boolean
isSongFinished
(JukeboxBlockEntity blockEntity, MusicDiscItem musicDisc) void
readNbt
(NbtCompound nbt) Reads data fromnbt
.void
void
static void
tick
(World world, BlockPos pos, BlockState state, JukeboxBlockEntity blockEntity) protected void
writeNbt
(NbtCompound nbt) Writes data tonbt
.Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, setCachedState, setStackNbt, setWorld, toInitialChunkDataNbt, toUpdatePacket, writeIdToNbt
-
Field Details
-
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
- 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
Reads data fromnbt
. 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 classBlockEntity
- 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
Writes data tonbt
. 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 classBlockEntity
- 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
- 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
- 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() -
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
- 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
- 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
- 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
-