Package net.minecraft.block.entity
Class JukeboxBlockEntity
java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.JukeboxBlockEntity
- All Implemented Interfaces:
Inventory,SingleStackInventory,Clearable
- Mappings:
Namespace Name intermediary net/minecraft/class_2619official daknamed net/minecraft/block/entity/JukeboxBlockEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DefaultedList<ItemStack>private booleanprivate longprivate static final intprivate longprivate intFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, worldFields inherited from interface net.minecraft.inventory.Inventory
field_42619, MAX_COUNT_PER_STACK -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlayerUse(PlayerEntity player) booleancanTransferTo(Inventory hopperInventory, int slot, ItemStack stack) voidintReturns 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 booleanbooleanprivate booleanisSongFinished(MusicDiscItem musicDisc) booleanReturns whether the given stack is a valid for the indicated slot position.voidreadNbt(NbtCompound nbt) Reads data fromnbt.removeStack(int slot, int amount) Removes a specific number of items from the given slot.voidvoidprivate voidspawnNoteParticle(World world, BlockPos pos) voidprivate voidprivate voidtick(World world, BlockPos pos, BlockState state) static voidtick(World world, BlockPos pos, BlockState state, JukeboxBlockEntity blockEntity) private voidupdateState(@Nullable Entity entity, boolean hasRecord) protected voidwriteNbt(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, writeIdToNbtMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.inventory.Inventory
containsAny, containsAny, count, markDirty, onClose, onOpenMethods inherited from interface net.minecraft.inventory.SingleStackInventory
clear, getStack, isEmpty, removeStack, removeStack, setStack, size
-
Field Details
-
SECOND_PER_TICK
private static final int SECOND_PER_TICK- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_42799Lnet/minecraft/class_2619;field_42799:Iofficial cLdak;c:Inamed SECOND_PER_TICKLnet/minecraft/block/entity/JukeboxBlockEntity;SECOND_PER_TICK:I
-
inventory
- Mappings:
Namespace Name Mixin selector intermediary field_42800Lnet/minecraft/class_2619;field_42800:Lnet/minecraft/class_2371;official dLdak;d:Lhn;named inventoryLnet/minecraft/block/entity/JukeboxBlockEntity;inventory:Lnet/minecraft/util/collection/DefaultedList;
-
ticksThisSecond
private int ticksThisSecond- Mappings:
Namespace Name Mixin selector intermediary field_39481Lnet/minecraft/class_2619;field_39481:Iofficial eLdak;e:Inamed ticksThisSecondLnet/minecraft/block/entity/JukeboxBlockEntity;ticksThisSecond:I
-
tickCount
private long tickCount- Mappings:
Namespace Name Mixin selector intermediary field_39482Lnet/minecraft/class_2619;field_39482:Jofficial fLdak;f:Jnamed tickCountLnet/minecraft/block/entity/JukeboxBlockEntity;tickCount:J
-
recordStartTick
private long recordStartTick- Mappings:
Namespace Name Mixin selector intermediary field_39483Lnet/minecraft/class_2619;field_39483:Jofficial gLdak;g:Jnamed recordStartTickLnet/minecraft/block/entity/JukeboxBlockEntity;recordStartTick:J
-
isPlaying
private boolean isPlaying- Mappings:
Namespace Name Mixin selector intermediary field_39484Lnet/minecraft/class_2619;field_39484:Zofficial hLdak;h:Znamed isPlayingLnet/minecraft/block/entity/JukeboxBlockEntity;isPlaying:Z
-
-
Constructor Details
-
JukeboxBlockEntity
- Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_2619;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial <init>Ldak;<init>(Lgu;Ldby;)Vnamed <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.
nbtmight 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:
readNbtin classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector intermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;)Vofficial aLczk;a(Lqr;)Vnamed readNbtLnet/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:
writeNbtin classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector intermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;)Vofficial bLczk;b(Lqr;)Vnamed writeNbtLnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
isPlayingRecord
public boolean isPlayingRecord()- Mappings:
Namespace Name Mixin selector intermediary method_44373Lnet/minecraft/class_2619;method_44373()Zofficial fLdak;f()Znamed isPlayingRecordLnet/minecraft/block/entity/JukeboxBlockEntity;isPlayingRecord()Z
-
updateState
- Mappings:
Namespace Name Mixin selector intermediary method_49209Lnet/minecraft/class_2619;method_49209(Lnet/minecraft/class_1297;Z)Vofficial aLdak;a(Lbfh;Z)Vnamed updateStateLnet/minecraft/block/entity/JukeboxBlockEntity;updateState(Lnet/minecraft/entity/Entity;Z)V
-
startPlaying
public void startPlaying()- Mappings:
Namespace Name Mixin selector intermediary method_49212Lnet/minecraft/class_2619;method_49212()Vofficial gLdak;g()Vnamed startPlayingLnet/minecraft/block/entity/JukeboxBlockEntity;startPlaying()V
-
stopPlaying
private void stopPlaying()- Mappings:
Namespace Name Mixin selector intermediary method_49214Lnet/minecraft/class_2619;method_49214()Vofficial vLdak;v()Vnamed stopPlayingLnet/minecraft/block/entity/JukeboxBlockEntity;stopPlaying()V
-
tick
- Mappings:
Namespace Name Mixin selector intermediary method_49211Lnet/minecraft/class_2619;method_49211(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial bLdak;b(Lcmk;Lgu;Ldby;)Vnamed tickLnet/minecraft/block/entity/JukeboxBlockEntity;tick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
isSongFinished
- Mappings:
Namespace Name Mixin selector intermediary method_44372Lnet/minecraft/class_2619;method_44372(Lnet/minecraft/class_1813;)Zofficial aLdak;a(Lcgp;)Znamed isSongFinishedLnet/minecraft/block/entity/JukeboxBlockEntity;isSongFinished(Lnet/minecraft/item/MusicDiscItem;)Z
-
hasSecondPassed
private boolean hasSecondPassed()- Mappings:
Namespace Name Mixin selector intermediary method_44371Lnet/minecraft/class_2619;method_44371()Zofficial wLdak;w()Znamed hasSecondPassedLnet/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:
removeStackin interfaceInventory- Returns:
- the removed items as a stack
- Mappings:
Namespace Name Mixin selector intermediary method_5434Lnet/minecraft/class_1263;method_5434(II)Lnet/minecraft/class_1799;official aLbdp;a(II)Lcfx;named removeStackLnet/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:
getMaxCountPerStackin interfaceInventory- Returns:
- the max
countof item stacks in this inventory - Mappings:
Namespace Name Mixin selector intermediary method_5444Lnet/minecraft/class_1263;method_5444()Iofficial ab_Lbdp;ab_()Inamed getMaxCountPerStackLnet/minecraft/inventory/Inventory;getMaxCountPerStack()I
-
canPlayerUse
- Specified by:
canPlayerUsein interfaceInventory- Mappings:
Namespace Name Mixin selector intermediary method_5443Lnet/minecraft/class_1263;method_5443(Lnet/minecraft/class_1657;)Zofficial aLbdp;a(Lbym;)Znamed canPlayerUseLnet/minecraft/inventory/Inventory;canPlayerUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
isValid
Returns whether the given stack is a valid for the indicated slot position. -
canTransferTo
- Specified by:
canTransferToin interfaceInventory- Mappings:
Namespace Name Mixin selector intermediary method_49104Lnet/minecraft/class_1263;method_49104(Lnet/minecraft/class_1263;ILnet/minecraft/class_1799;)Zofficial aLbdp;a(Lbdp;ILcfx;)Znamed canTransferToLnet/minecraft/inventory/Inventory;canTransferTo(Lnet/minecraft/inventory/Inventory;ILnet/minecraft/item/ItemStack;)Z
-
spawnNoteParticle
- Mappings:
Namespace Name Mixin selector intermediary method_48969Lnet/minecraft/class_2619;method_48969(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Vofficial aLdak;a(Lcmk;Lgu;)Vnamed spawnNoteParticleLnet/minecraft/block/entity/JukeboxBlockEntity;spawnNoteParticle(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
-
dropRecord
public void dropRecord()- Mappings:
Namespace Name Mixin selector intermediary method_49213Lnet/minecraft/class_2619;method_49213()Vofficial iLdak;i()Vnamed dropRecordLnet/minecraft/block/entity/JukeboxBlockEntity;dropRecord()V
-
tick
public static void tick(World world, BlockPos pos, BlockState state, JukeboxBlockEntity blockEntity) - Mappings:
Namespace Name Mixin selector intermediary method_44370Lnet/minecraft/class_2619;method_44370(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2619;)Vofficial aLdak;a(Lcmk;Lgu;Ldby;Ldak;)Vnamed tickLnet/minecraft/block/entity/JukeboxBlockEntity;tick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/JukeboxBlockEntity;)V
-
setDisc
- Mappings:
Namespace Name Mixin selector intermediary method_49210Lnet/minecraft/class_2619;method_49210(Lnet/minecraft/class_1799;)Vofficial aLdak;a(Lcfx;)Vnamed setDiscLnet/minecraft/block/entity/JukeboxBlockEntity;setDisc(Lnet/minecraft/item/ItemStack;)V
-