Class JukeboxBlockEntity
- All Implemented Interfaces:
Inventory,SingleStackInventory,SingleStackInventory.SingleStackBlockEntityInventory,Clearable
- Mappings:
Namespace Name official dljintermediary net/minecraft/class_2619named net/minecraft/block/entity/JukeboxBlockEntity
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.inventory.SingleStackInventory
SingleStackInventory.SingleStackBlockEntityInventory -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate ItemStackprivate longprivate static final intprivate longprivate intFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, worldFields inherited from interface net.minecraft.inventory.Inventory
DEFAULT_MAX_INTERACTION_RANGE, MAX_COUNT_PER_STACK -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanTransferTo(Inventory hopperInventory, int slot, ItemStack stack) Returns whether a hopper can transferstackfromslotto the hopper.decreaseStack(int count) voidintReturns the maximum number of items a stack can contain when placed inside this inventory.getStack()private booleanbooleanprivate booleanisSongFinished(MusicDiscItem musicDisc) booleanReturns whetherstackis valid for theslot.voidreadNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) Reads data fromnbt.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, RegistryWrapper.WrapperLookup registryLookup) 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, emptyStack, getStack, isEmpty, removeStack, removeStack, setStack, sizeMethods inherited from interface net.minecraft.inventory.SingleStackInventory.SingleStackBlockEntityInventory
canPlayerUse
-
Field Details
-
SECOND_PER_TICK
private static final int SECOND_PER_TICK- See Also:
- Mappings:
Namespace Name Mixin selector official cLdlj;c:Iintermediary field_42799Lnet/minecraft/class_2619;field_42799:Inamed SECOND_PER_TICKLnet/minecraft/block/entity/JukeboxBlockEntity;SECOND_PER_TICK:I
-
recordStack
- Mappings:
Namespace Name Mixin selector official dLdlj;d:Lcqm;intermediary field_46507Lnet/minecraft/class_2619;field_46507:Lnet/minecraft/class_1799;named recordStackLnet/minecraft/block/entity/JukeboxBlockEntity;recordStack:Lnet/minecraft/item/ItemStack;
-
ticksThisSecond
private int ticksThisSecond- Mappings:
Namespace Name Mixin selector official eLdlj;e:Iintermediary field_39481Lnet/minecraft/class_2619;field_39481:Inamed ticksThisSecondLnet/minecraft/block/entity/JukeboxBlockEntity;ticksThisSecond:I
-
tickCount
private long tickCount- Mappings:
Namespace Name Mixin selector official fLdlj;f:Jintermediary field_39482Lnet/minecraft/class_2619;field_39482:Jnamed tickCountLnet/minecraft/block/entity/JukeboxBlockEntity;tickCount:J
-
recordStartTick
private long recordStartTick- Mappings:
Namespace Name Mixin selector official gLdlj;g:Jintermediary field_39483Lnet/minecraft/class_2619;field_39483:Jnamed recordStartTickLnet/minecraft/block/entity/JukeboxBlockEntity;recordStartTick:J
-
isPlaying
private boolean isPlaying- Mappings:
Namespace Name Mixin selector official hLdlj;h:Zintermediary field_39484Lnet/minecraft/class_2619;field_39484:Znamed isPlayingLnet/minecraft/block/entity/JukeboxBlockEntity;isPlaying:Z
-
-
Constructor Details
-
JukeboxBlockEntity
- Mappings:
Namespace Name Mixin selector official <init>Ldlj;<init>(Lib;Ldnb;)Vintermediary <init>Lnet/minecraft/class_2619;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)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 official aLdki;a(Lta;Lin$a;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vnamed readNbtLnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)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 official bLdki;b(Lta;Lin$a;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vnamed writeNbtLnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
-
isPlayingRecord
public boolean isPlayingRecord()- Mappings:
Namespace Name Mixin selector official jLdlj;j()Zintermediary method_44373Lnet/minecraft/class_2619;method_44373()Znamed isPlayingRecordLnet/minecraft/block/entity/JukeboxBlockEntity;isPlayingRecord()Z
-
updateState
- Mappings:
Namespace Name Mixin selector official aLdlj;a(Lbox;Z)Vintermediary method_49209Lnet/minecraft/class_2619;method_49209(Lnet/minecraft/class_1297;Z)Vnamed updateStateLnet/minecraft/block/entity/JukeboxBlockEntity;updateState(Lnet/minecraft/entity/Entity;Z)V
-
startPlaying
public void startPlaying()- Mappings:
Namespace Name Mixin selector official kLdlj;k()Vintermediary method_49212Lnet/minecraft/class_2619;method_49212()Vnamed startPlayingLnet/minecraft/block/entity/JukeboxBlockEntity;startPlaying()V
-
stopPlaying
private void stopPlaying()- Mappings:
Namespace Name Mixin selector official sLdlj;s()Vintermediary method_49214Lnet/minecraft/class_2619;method_49214()Vnamed stopPlayingLnet/minecraft/block/entity/JukeboxBlockEntity;stopPlaying()V
-
tick
- Mappings:
Namespace Name Mixin selector official bLdlj;b(Lcxb;Lib;Ldnb;)Vintermediary method_49211Lnet/minecraft/class_2619;method_49211(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)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 official aLdlj;a(Lcre;)Zintermediary method_44372Lnet/minecraft/class_2619;method_44372(Lnet/minecraft/class_1813;)Znamed isSongFinishedLnet/minecraft/block/entity/JukeboxBlockEntity;isSongFinished(Lnet/minecraft/item/MusicDiscItem;)Z
-
hasSecondPassed
private boolean hasSecondPassed()- Mappings:
Namespace Name Mixin selector official uLdlj;u()Zintermediary method_44371Lnet/minecraft/class_2619;method_44371()Znamed hasSecondPassedLnet/minecraft/block/entity/JukeboxBlockEntity;hasSecondPassed()Z
-
getStack
- Specified by:
getStackin interfaceSingleStackInventory- Mappings:
Namespace Name Mixin selector official fLere;f()Lcqm;intermediary method_54079Lnet/minecraft/class_8181;method_54079()Lnet/minecraft/class_1799;named getStackLnet/minecraft/inventory/SingleStackInventory;getStack()Lnet/minecraft/item/ItemStack;
-
decreaseStack
- Specified by:
decreaseStackin interfaceSingleStackInventory- Mappings:
Namespace Name Mixin selector official cLere;c(I)Lcqm;intermediary method_54078Lnet/minecraft/class_8181;method_54078(I)Lnet/minecraft/class_1799;named decreaseStackLnet/minecraft/inventory/SingleStackInventory;decreaseStack(I)Lnet/minecraft/item/ItemStack;
-
setStack
- Specified by:
setStackin interfaceSingleStackInventory- Mappings:
Namespace Name Mixin selector official aLere;a(Lcqm;)Vintermediary method_54077Lnet/minecraft/class_8181;method_54077(Lnet/minecraft/class_1799;)Vnamed setStackLnet/minecraft/inventory/SingleStackInventory;setStack(Lnet/minecraft/item/ItemStack;)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:
getMaxCountPerStackin interfaceInventory- Returns:
- the maximum number of items a stack can contain when placed inside this inventory
- Mappings:
Namespace Name Mixin selector official ak_Lbmw;ak_()Iintermediary method_5444Lnet/minecraft/class_1263;method_5444()Inamed getMaxCountPerStackLnet/minecraft/inventory/Inventory;getMaxCountPerStack()I
-
asBlockEntity
- Specified by:
asBlockEntityin interfaceSingleStackInventory.SingleStackBlockEntityInventory- Mappings:
Namespace Name Mixin selector official tLere$a;t()Ldki;intermediary method_54080Lnet/minecraft/class_8181$class_9210;method_54080()Lnet/minecraft/class_2586;named asBlockEntityLnet/minecraft/inventory/SingleStackInventory$SingleStackBlockEntityInventory;asBlockEntity()Lnet/minecraft/block/entity/BlockEntity;
-
isValid
Returns whetherstackis valid for theslot.Implementations can, for example, use this to check whether the item is in a specific tag. This returns
trueby default.- Specified by:
isValidin interfaceInventory- Returns:
- whether
stackis valid for theslot - Mappings:
Namespace Name Mixin selector official bLbmw;b(ILcqm;)Zintermediary method_5437Lnet/minecraft/class_1263;method_5437(ILnet/minecraft/class_1799;)Znamed isValidLnet/minecraft/inventory/Inventory;isValid(ILnet/minecraft/item/ItemStack;)Z
-
canTransferTo
Returns whether a hopper can transferstackfromslotto the hopper.This returns
trueby default.- Specified by:
canTransferToin interfaceInventory- Returns:
- whether a hopper can transfer
stackfromslotto the hopper - Mappings:
Namespace Name Mixin selector official aLbmw;a(Lbmw;ILcqm;)Zintermediary method_49104Lnet/minecraft/class_1263;method_49104(Lnet/minecraft/class_1263;ILnet/minecraft/class_1799;)Znamed canTransferToLnet/minecraft/inventory/Inventory;canTransferTo(Lnet/minecraft/inventory/Inventory;ILnet/minecraft/item/ItemStack;)Z
-
spawnNoteParticle
- Mappings:
Namespace Name Mixin selector official aLdlj;a(Lcxb;Lib;)Vintermediary method_48969Lnet/minecraft/class_2619;method_48969(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)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 official lLdlj;l()Vintermediary method_49213Lnet/minecraft/class_2619;method_49213()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 official aLdlj;a(Lcxb;Lib;Ldnb;Ldlj;)Vintermediary method_44370Lnet/minecraft/class_2619;method_44370(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2619;)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 official bLdlj;b(Lcqm;)Vintermediary method_49210Lnet/minecraft/class_2619;method_49210(Lnet/minecraft/class_1799;)Vnamed setDiscLnet/minecraft/block/entity/JukeboxBlockEntity;setDisc(Lnet/minecraft/item/ItemStack;)V
-