Package net.minecraft.block.entity
Class JukeboxBlockEntity
java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.JukeboxBlockEntity
- All Implemented Interfaces:
class_8181
,Inventory
,Clearable
- Mappings:
Namespace Name official czz
intermediary net/minecraft/class_2619
named net/minecraft/block/entity/JukeboxBlockEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private final DefaultedList<ItemStack>
private boolean
private long
private long
private int
Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world
Fields inherited from interface net.minecraft.inventory.Inventory
field_42619, MAX_COUNT_PER_STACK
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canPlayerUse
(PlayerEntity player) int
Returns the maximum number of items a stack can contain when placed inside this inventory.getStack
(int slot) Fetches the stack currently stored at the given slot.private boolean
boolean
private boolean
isSongFinished
(MusicDiscItem musicDisc) boolean
Returns whether the given stack is a valid for the indicated slot position.boolean
method_49104
(Inventory inventory, int int2, ItemStack itemStack) private void
method_49209
(@Nullable Entity entity, boolean bool) void
method_49210
(ItemStack itemStack) private void
method_49211
(World world, BlockPos blockPos, BlockState blockState) void
void
private void
void
readNbt
(NbtCompound nbt) Reads data fromnbt
.removeStack
(int slot, int amount) Removes a specific number of items from the given slot.void
private void
spawnNoteParticle
(World world, BlockPos blockPos) 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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.class_8181
clear, isEmpty, method_49274, method_49275, method_49276, removeStack, size
Methods inherited from interface net.minecraft.inventory.Inventory
containsAny, containsAny, count, markDirty, onClose, onOpen
-
Field Details
-
field_42799
private static final int field_42799- See Also:
- Mappings:
Namespace Name Mixin selector official c
Lczz;c:I
intermediary field_42799
Lnet/minecraft/class_2619;field_42799:I
named field_42799
Lnet/minecraft/block/entity/JukeboxBlockEntity;field_42799:I
-
field_42800
- Mappings:
Namespace Name Mixin selector official d
Lczz;d:Lhk;
intermediary field_42800
Lnet/minecraft/class_2619;field_42800:Lnet/minecraft/class_2371;
named field_42800
Lnet/minecraft/block/entity/JukeboxBlockEntity;field_42800:Lnet/minecraft/util/collection/DefaultedList;
-
ticksThisSecond
private int ticksThisSecond- Mappings:
Namespace Name Mixin selector official e
Lczz;e: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 f
Lczz;f: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 g
Lczz;g: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 h
Lczz;h: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>
Lczz;<init>(Lgr;Ldbn;)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
Lczb;a(Lrc;)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
Lczb;b(Lrc;)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
-
isPlayingRecord
public boolean isPlayingRecord()- Mappings:
Namespace Name Mixin selector official f
Lczz;f()Z
intermediary method_44373
Lnet/minecraft/class_2619;method_44373()Z
named isPlayingRecord
Lnet/minecraft/block/entity/JukeboxBlockEntity;isPlayingRecord()Z
-
method_49209
- Mappings:
Namespace Name Mixin selector official a
Lczz;a(Lbfg;Z)V
intermediary method_49209
Lnet/minecraft/class_2619;method_49209(Lnet/minecraft/class_1297;Z)V
named method_49209
Lnet/minecraft/block/entity/JukeboxBlockEntity;method_49209(Lnet/minecraft/entity/Entity;Z)V
-
method_49212
public void method_49212()- Mappings:
Namespace Name Mixin selector official g
Lczz;g()V
intermediary method_49212
Lnet/minecraft/class_2619;method_49212()V
named method_49212
Lnet/minecraft/block/entity/JukeboxBlockEntity;method_49212()V
-
method_49214
private void method_49214()- Mappings:
Namespace Name Mixin selector official v
Lczz;v()V
intermediary method_49214
Lnet/minecraft/class_2619;method_49214()V
named method_49214
Lnet/minecraft/block/entity/JukeboxBlockEntity;method_49214()V
-
method_49211
- Mappings:
Namespace Name Mixin selector official b
Lczz;b(Lcmh;Lgr;Ldbn;)V
intermediary method_49211
Lnet/minecraft/class_2619;method_49211(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
named method_49211
Lnet/minecraft/block/entity/JukeboxBlockEntity;method_49211(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
isSongFinished
- Mappings:
Namespace Name Mixin selector official a
Lczz;a(Lcgm;)Z
intermediary method_44372
Lnet/minecraft/class_2619;method_44372(Lnet/minecraft/class_1813;)Z
named isSongFinished
Lnet/minecraft/block/entity/JukeboxBlockEntity;isSongFinished(Lnet/minecraft/item/MusicDiscItem;)Z
-
hasSecondPassed
private boolean hasSecondPassed()- Mappings:
Namespace Name Mixin selector official w
Lczz;w()Z
intermediary method_44371
Lnet/minecraft/class_2619;method_44371()Z
named hasSecondPassed
Lnet/minecraft/block/entity/JukeboxBlockEntity;hasSecondPassed()Z
-
getStack
Fetches the stack currently stored at the given slot. If the slot is empty, or is outside the bounds of this inventory, returns seeItemStack.EMPTY
. -
removeStack
Removes a specific number of items from the given slot.- Specified by:
removeStack
in interfaceInventory
- Returns:
- the removed items as a stack
- Mappings:
Namespace Name Mixin selector official a
Lbdq;a(II)Lcfu;
intermediary method_5434
Lnet/minecraft/class_1263;method_5434(II)Lnet/minecraft/class_1799;
named removeStack
Lnet/minecraft/inventory/Inventory;removeStack(II)Lnet/minecraft/item/ItemStack;
-
setStack
-
getMaxCountPerStack
public int getMaxCountPerStack()Returns the maximum number of items a stack can contain when placed inside this inventory. No slots may have more than this number of items. It is effectively the stacking limit for this inventory's slots.- Specified by:
getMaxCountPerStack
in interfaceInventory
- Returns:
- the max
count
of item stacks in this inventory - Mappings:
Namespace Name Mixin selector official Z_
Lbdq;Z_()I
intermediary method_5444
Lnet/minecraft/class_1263;method_5444()I
named getMaxCountPerStack
Lnet/minecraft/inventory/Inventory;getMaxCountPerStack()I
-
canPlayerUse
- Specified by:
canPlayerUse
in interfaceInventory
- Mappings:
Namespace Name Mixin selector official a
Lbdq;a(Lbyl;)Z
intermediary method_5443
Lnet/minecraft/class_1263;method_5443(Lnet/minecraft/class_1657;)Z
named canPlayerUse
Lnet/minecraft/inventory/Inventory;canPlayerUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
isValid
Returns whether the given stack is a valid for the indicated slot position. -
method_49104
- Specified by:
method_49104
in interfaceInventory
- Mappings:
Namespace Name Mixin selector official a
Lbdq;a(Lbdq;ILcfu;)Z
intermediary method_49104
Lnet/minecraft/class_1263;method_49104(Lnet/minecraft/class_1263;ILnet/minecraft/class_1799;)Z
named method_49104
Lnet/minecraft/inventory/Inventory;method_49104(Lnet/minecraft/inventory/Inventory;ILnet/minecraft/item/ItemStack;)Z
-
spawnNoteParticle
- Mappings:
Namespace Name Mixin selector official a
Lczz;a(Lcmh;Lgr;)V
intermediary method_48969
Lnet/minecraft/class_2619;method_48969(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)V
named spawnNoteParticle
Lnet/minecraft/block/entity/JukeboxBlockEntity;spawnNoteParticle(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
-
method_49213
public void method_49213()- Mappings:
Namespace Name Mixin selector official i
Lczz;i()V
intermediary method_49213
Lnet/minecraft/class_2619;method_49213()V
named method_49213
Lnet/minecraft/block/entity/JukeboxBlockEntity;method_49213()V
-
tick
public static void tick(World world, BlockPos pos, BlockState state, JukeboxBlockEntity blockEntity) - Mappings:
Namespace Name Mixin selector official a
Lczz;a(Lcmh;Lgr;Ldbn;Lczz;)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
-
method_49210
- Mappings:
Namespace Name Mixin selector official a
Lczz;a(Lcfu;)V
intermediary method_49210
Lnet/minecraft/class_2619;method_49210(Lnet/minecraft/class_1799;)V
named method_49210
Lnet/minecraft/block/entity/JukeboxBlockEntity;method_49210(Lnet/minecraft/item/ItemStack;)V
-