Class JukeboxBlockEntity
- All Implemented Interfaces:
Inventory
,SingleStackInventory
,SingleStackInventory.SingleStackBlockEntityInventory
,Clearable
- Mappings:
Namespace Name named net/minecraft/block/entity/JukeboxBlockEntity
intermediary net/minecraft/class_2619
official dwa
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.entity.BlockEntity
BlockEntity.ComponentsAccess
Nested classes/interfaces inherited from interface net.minecraft.inventory.SingleStackInventory
SingleStackInventory.SingleStackBlockEntityInventory
-
Field Summary
Modifier and TypeFieldDescriptionprivate final JukeboxManager
static final String
private ItemStack
static final String
Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world
Fields inherited from interface net.minecraft.inventory.Inventory
DEFAULT_MAX_INTERACTION_RANGE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canTransferTo
(Inventory hopperInventory, int slot, ItemStack stack) Returns whether a hopper can transferstack
fromslot
to the hopper.decreaseStack
(int count) void
int
int
Returns the maximum number of items a stack can contain when placed inside this inventory.getStack()
boolean
Returns whetherstack
is valid for theslot
.void
private void
onRecordStackChanged
(boolean hasRecord) protected void
readNbt
(NbtCompound nbt, RegistryWrapper.WrapperLookup registries) Reads data fromnbt
.void
void
void
static void
tick
(World world, BlockPos pos, BlockState state, JukeboxBlockEntity blockEntity) protected void
writeNbt
(NbtCompound nbt, RegistryWrapper.WrapperLookup registries) Writes data tonbt
.Methods inherited from class net.minecraft.block.entity.BlockEntity
addComponents, cancelRemoval, copyItemDataRequiresOperator, createComponentlessNbt, createComponentlessNbtWithIdentifyingData, createComponentMap, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getComponents, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, read, readComponentlessNbt, readComponents, readComponents, readComponents, removeFromCopiedStackNbt, setCachedState, setComponents, setStackNbt, setWorld, supports, toInitialChunkDataNbt, toUpdatePacket, tryParseCustomName, 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.inventory.Inventory
containsAny, containsAny, count, getMaxCount, markDirty, onClose, onOpen
Methods inherited from interface net.minecraft.inventory.SingleStackInventory
clear, emptyStack, getStack, isEmpty, removeStack, removeStack, setStack, size
Methods inherited from interface net.minecraft.inventory.SingleStackInventory.SingleStackBlockEntityInventory
canPlayerUse
-
Field Details
-
RECORD_ITEM_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector named RECORD_ITEM_NBT_KEY
Lnet/minecraft/block/entity/JukeboxBlockEntity;RECORD_ITEM_NBT_KEY:Ljava/lang/String;
intermediary field_52064
Lnet/minecraft/class_2619;field_52064:Ljava/lang/String;
official b
Ldwa;b:Ljava/lang/String;
-
TICKS_SINCE_SONG_STARTED_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector named TICKS_SINCE_SONG_STARTED_NBT_KEY
Lnet/minecraft/block/entity/JukeboxBlockEntity;TICKS_SINCE_SONG_STARTED_NBT_KEY:Ljava/lang/String;
intermediary field_52065
Lnet/minecraft/class_2619;field_52065:Ljava/lang/String;
official c
Ldwa;c:Ljava/lang/String;
-
recordStack
- Mappings:
Namespace Name Mixin selector named recordStack
Lnet/minecraft/block/entity/JukeboxBlockEntity;recordStack:Lnet/minecraft/item/ItemStack;
intermediary field_46507
Lnet/minecraft/class_2619;field_46507:Lnet/minecraft/class_1799;
official d
Ldwa;d:Lcxo;
-
manager
- Mappings:
Namespace Name Mixin selector named manager
Lnet/minecraft/block/entity/JukeboxBlockEntity;manager:Lnet/minecraft/block/jukebox/JukeboxManager;
intermediary field_52066
Lnet/minecraft/class_2619;field_52066:Lnet/minecraft/class_9794;
official e
Ldwa;e:Lcxv;
-
-
Constructor Details
-
JukeboxBlockEntity
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/block/entity/JukeboxBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
intermediary <init>
Lnet/minecraft/class_2619;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
official <init>
Ldwa;<init>(Ljh;Ldxu;)V
-
-
Method Details
-
getManager
- Mappings:
Namespace Name Mixin selector named getManager
Lnet/minecraft/block/entity/JukeboxBlockEntity;getManager()Lnet/minecraft/block/jukebox/JukeboxManager;
intermediary method_60784
Lnet/minecraft/class_2619;method_60784()Lnet/minecraft/class_9794;
official j
Ldwa;j()Lcxv;
-
onManagerChange
public void onManagerChange()- Mappings:
Namespace Name Mixin selector named onManagerChange
Lnet/minecraft/block/entity/JukeboxBlockEntity;onManagerChange()V
intermediary method_60785
Lnet/minecraft/class_2619;method_60785()V
official k
Ldwa;k()V
-
onRecordStackChanged
private void onRecordStackChanged(boolean hasRecord) - Mappings:
Namespace Name Mixin selector named onRecordStackChanged
Lnet/minecraft/block/entity/JukeboxBlockEntity;onRecordStackChanged(Z)V
intermediary method_60782
Lnet/minecraft/class_2619;method_60782(Z)V
official a
Ldwa;a(Z)V
-
dropRecord
public void dropRecord()- Mappings:
Namespace Name Mixin selector named dropRecord
Lnet/minecraft/block/entity/JukeboxBlockEntity;dropRecord()V
intermediary method_49213
Lnet/minecraft/class_2619;method_49213()V
official t
Ldwa;t()V
-
tick
public static void tick(World world, BlockPos pos, BlockState state, JukeboxBlockEntity blockEntity) - Mappings:
Namespace Name Mixin selector 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
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
official a
Ldwa;a(Ldhh;Ljh;Ldxu;Ldwa;)V
-
getComparatorOutput
public int getComparatorOutput()- Mappings:
Namespace Name Mixin selector named getComparatorOutput
Lnet/minecraft/block/entity/JukeboxBlockEntity;getComparatorOutput()I
intermediary method_60992
Lnet/minecraft/class_2619;method_60992()I
official u
Ldwa;u()I
-
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 named readNbt
Lnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
intermediary method_11014
Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
official a
Lduw;a(Lux;Ljs$a;)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 named writeNbt
Lnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
intermediary method_11007
Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
official b
Lduw;b(Lux;Ljs$a;)V
-
getStack
- Specified by:
getStack
in interfaceSingleStackInventory
- Mappings:
Namespace Name Mixin selector named getStack
Lnet/minecraft/inventory/SingleStackInventory;getStack()Lnet/minecraft/item/ItemStack;
intermediary method_54079
Lnet/minecraft/class_8181;method_54079()Lnet/minecraft/class_1799;
official f
Lfdj;f()Lcxo;
-
decreaseStack
- Specified by:
decreaseStack
in interfaceSingleStackInventory
- Mappings:
Namespace Name Mixin selector named decreaseStack
Lnet/minecraft/inventory/SingleStackInventory;decreaseStack(I)Lnet/minecraft/item/ItemStack;
intermediary method_54078
Lnet/minecraft/class_8181;method_54078(I)Lnet/minecraft/class_1799;
official c
Lfdj;c(I)Lcxo;
-
setStack
- Specified by:
setStack
in interfaceSingleStackInventory
- Mappings:
Namespace Name Mixin selector named setStack
Lnet/minecraft/inventory/SingleStackInventory;setStack(Lnet/minecraft/item/ItemStack;)V
intermediary method_54077
Lnet/minecraft/class_8181;method_54077(Lnet/minecraft/class_1799;)V
official b
Lfdj;b(Lcxo;)V
-
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 maximum number of items a stack can contain when placed inside this inventory
- Mappings:
Namespace Name Mixin selector named getMaxCountPerStack
Lnet/minecraft/inventory/Inventory;getMaxCountPerStack()I
intermediary method_5444
Lnet/minecraft/class_1263;method_5444()I
official ao_
Lbtb;ao_()I
-
asBlockEntity
- Specified by:
asBlockEntity
in interfaceSingleStackInventory.SingleStackBlockEntityInventory
- Mappings:
Namespace Name Mixin selector named asBlockEntity
Lnet/minecraft/inventory/SingleStackInventory$SingleStackBlockEntityInventory;asBlockEntity()Lnet/minecraft/block/entity/BlockEntity;
intermediary method_54080
Lnet/minecraft/class_8181$class_9210;method_54080()Lnet/minecraft/class_2586;
official v
Lfdj$a;v()Lduw;
-
isValid
Returns whetherstack
is valid for theslot
.Implementations can, for example, use this to check whether the item is in a specific tag. This returns
true
by default.- Specified by:
isValid
in interfaceInventory
- Returns:
- whether
stack
is valid for theslot
- Mappings:
Namespace Name Mixin selector named isValid
Lnet/minecraft/inventory/Inventory;isValid(ILnet/minecraft/item/ItemStack;)Z
intermediary method_5437
Lnet/minecraft/class_1263;method_5437(ILnet/minecraft/class_1799;)Z
official b
Lbtb;b(ILcxo;)Z
-
canTransferTo
Returns whether a hopper can transferstack
fromslot
to the hopper.This returns
true
by default.- Specified by:
canTransferTo
in interfaceInventory
- Returns:
- whether a hopper can transfer
stack
fromslot
to the hopper - Mappings:
Namespace Name Mixin selector named canTransferTo
Lnet/minecraft/inventory/Inventory;canTransferTo(Lnet/minecraft/inventory/Inventory;ILnet/minecraft/item/ItemStack;)Z
intermediary method_49104
Lnet/minecraft/class_1263;method_49104(Lnet/minecraft/class_1263;ILnet/minecraft/class_1799;)Z
official a
Lbtb;a(Lbtb;ILcxo;)Z
-
setDisc
- Mappings:
Namespace Name Mixin selector named setDisc
Lnet/minecraft/block/entity/JukeboxBlockEntity;setDisc(Lnet/minecraft/item/ItemStack;)V
intermediary method_49210
Lnet/minecraft/class_2619;method_49210(Lnet/minecraft/class_1799;)V
official c
Ldwa;c(Lcxo;)V
-
reloadDisc
public void reloadDisc()- Mappings:
Namespace Name Mixin selector named reloadDisc
Lnet/minecraft/block/entity/JukeboxBlockEntity;reloadDisc()V
intermediary method_60786
Lnet/minecraft/class_2619;method_60786()V
official w
Ldwa;w()V
-