Class JukeboxBlockEntity
- All Implemented Interfaces:
Iterable<ItemStack>,Inventory,SingleStackInventory,SingleStackInventory.SingleStackBlockEntityInventory,Clearable
- Mappings:
Namespace Name named net/minecraft/block/entity/JukeboxBlockEntityintermediary net/minecraft/class_2619official egp
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.inventory.Inventory
Inventory.IteratorNested classes/interfaces inherited from interface net.minecraft.inventory.SingleStackInventory
SingleStackInventory.SingleStackBlockEntityInventory -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JukeboxManagerstatic final Stringprivate ItemStackstatic final StringFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, worldFields inherited from interface net.minecraft.inventory.Inventory
DEFAULT_MAX_INTERACTION_RANGE -
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) voidintintReturns the maximum number of items a stack can contain when placed inside this inventory.getStack()booleanReturns whetherstackis valid for theslot.voidvoidonBlockReplaced(BlockPos pos, BlockState oldState) voidprivate voidonRecordStackChanged(boolean hasRecord) protected voidReads data fromnbt.voidvoidvoidstatic voidtick(World world, BlockPos pos, BlockState state, JukeboxBlockEntity blockEntity) protected voidWrites data tonbt.Methods inherited from class net.minecraft.block.entity.BlockEntity
addComponents, cancelRemoval, createComponentlessNbt, createComponentMap, createFromNbt, createNbt, createNbtWithIdentifyingData, getCachedState, getComponents, getNameForReport, getPos, getReporterContext, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, onSyncedBlockEvent, populateCrashReport, posFromNbt, read, readComponentlessData, readComponents, readComponents, readComponents, removeFromCopiedStackData, setCachedState, setComponents, setWorld, supports, toInitialChunkDataNbt, toUpdatePacket, tryParseCustomName, writeComponentlessData, writeDataWithId, writeDataWithoutId, writeFullData, writeIdMethods 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, getMaxCount, getViewingUsers, iterator, markDirty, onClose, onOpenMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods 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
-
RECORD_ITEM_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector named RECORD_ITEM_NBT_KEYLnet/minecraft/block/entity/JukeboxBlockEntity;RECORD_ITEM_NBT_KEY:Ljava/lang/String;intermediary field_52064Lnet/minecraft/class_2619;field_52064:Ljava/lang/String;official bLegp;b:Ljava/lang/String;
-
TICKS_SINCE_SONG_STARTED_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector named TICKS_SINCE_SONG_STARTED_NBT_KEYLnet/minecraft/block/entity/JukeboxBlockEntity;TICKS_SINCE_SONG_STARTED_NBT_KEY:Ljava/lang/String;intermediary field_52065Lnet/minecraft/class_2619;field_52065:Ljava/lang/String;official cLegp;c:Ljava/lang/String;
-
recordStack
- Mappings:
Namespace Name Mixin selector named recordStackLnet/minecraft/block/entity/JukeboxBlockEntity;recordStack:Lnet/minecraft/item/ItemStack;intermediary field_46507Lnet/minecraft/class_2619;field_46507:Lnet/minecraft/class_1799;official dLegp;d:Ldgs;
-
manager
- Mappings:
Namespace Name Mixin selector named managerLnet/minecraft/block/entity/JukeboxBlockEntity;manager:Lnet/minecraft/block/jukebox/JukeboxManager;intermediary field_52066Lnet/minecraft/class_2619;field_52066:Lnet/minecraft/class_9794;official eLegp;e:Ldgz;
-
-
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;)Vintermediary <init>Lnet/minecraft/class_2619;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial <init>Legp;<init>(Lja;Leip;)V
-
-
Method Details
-
getManager
- Mappings:
Namespace Name Mixin selector named getManagerLnet/minecraft/block/entity/JukeboxBlockEntity;getManager()Lnet/minecraft/block/jukebox/JukeboxManager;intermediary method_60784Lnet/minecraft/class_2619;method_60784()Lnet/minecraft/class_9794;official hLegp;h()Ldgz;
-
onManagerChange
public void onManagerChange()- Mappings:
Namespace Name Mixin selector named onManagerChangeLnet/minecraft/block/entity/JukeboxBlockEntity;onManagerChange()Vintermediary method_60785Lnet/minecraft/class_2619;method_60785()Vofficial kLegp;k()V
-
onRecordStackChanged
private void onRecordStackChanged(boolean hasRecord) - Mappings:
Namespace Name Mixin selector named onRecordStackChangedLnet/minecraft/block/entity/JukeboxBlockEntity;onRecordStackChanged(Z)Vintermediary method_60782Lnet/minecraft/class_2619;method_60782(Z)Vofficial aLegp;a(Z)V
-
dropRecord
public void dropRecord()- Mappings:
Namespace Name Mixin selector named dropRecordLnet/minecraft/block/entity/JukeboxBlockEntity;dropRecord()Vintermediary method_49213Lnet/minecraft/class_2619;method_49213()Vofficial lLegp;l()V
-
tick
public static void tick(World world, BlockPos pos, BlockState state, JukeboxBlockEntity blockEntity) - Mappings:
Namespace Name Mixin selector named tickLnet/minecraft/block/entity/JukeboxBlockEntity;tick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/JukeboxBlockEntity;)Vintermediary method_44370Lnet/minecraft/class_2619;method_44370(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2619;)Vofficial aLegp;a(Ldqt;Lja;Leip;Legp;)V
-
getComparatorOutput
public int getComparatorOutput()- Mappings:
Namespace Name Mixin selector named getComparatorOutputLnet/minecraft/block/entity/JukeboxBlockEntity;getComparatorOutput()Iintermediary method_60992Lnet/minecraft/class_2619;method_60992()Iofficial mLegp;m()I
-
readData
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:
readDatain classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector named readDataLnet/minecraft/block/entity/BlockEntity;readData(Lnet/minecraft/storage/ReadView;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_11368;)Vofficial aLefj;a(Lfhs;)V
-
writeData
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:
writeDatain classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector named writeDataLnet/minecraft/block/entity/BlockEntity;writeData(Lnet/minecraft/storage/WriteView;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_11372;)Vofficial aLefj;a(Lfhu;)V
-
getStack
- Specified by:
getStackin interfaceSingleStackInventory- Mappings:
Namespace Name Mixin selector named getStackLnet/minecraft/inventory/SingleStackInventory;getStack()Lnet/minecraft/item/ItemStack;intermediary method_54079Lnet/minecraft/class_8181;method_54079()Lnet/minecraft/class_1799;official gLfox;g()Ldgs;
-
decreaseStack
- Specified by:
decreaseStackin interfaceSingleStackInventory- Mappings:
Namespace Name Mixin selector named decreaseStackLnet/minecraft/inventory/SingleStackInventory;decreaseStack(I)Lnet/minecraft/item/ItemStack;intermediary method_54078Lnet/minecraft/class_8181;method_54078(I)Lnet/minecraft/class_1799;official cLfox;c(I)Ldgs;
-
setStack
- Specified by:
setStackin interfaceSingleStackInventory- Mappings:
Namespace Name Mixin selector named setStackLnet/minecraft/inventory/SingleStackInventory;setStack(Lnet/minecraft/item/ItemStack;)Vintermediary method_54077Lnet/minecraft/class_8181;method_54077(Lnet/minecraft/class_1799;)Vofficial bLfox;b(Ldgs;)V
-
markRemoved
public void markRemoved()- Overrides:
markRemovedin classBlockEntity- Mappings:
Namespace Name Mixin selector named markRemovedLnet/minecraft/block/entity/BlockEntity;markRemoved()Vintermediary method_11012Lnet/minecraft/class_2586;method_11012()Vofficial ay_Lefj;ay_()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 named getMaxCountPerStackLnet/minecraft/inventory/Inventory;getMaxCountPerStack()Iintermediary method_5444Lnet/minecraft/class_1263;method_5444()Iofficial ap_Lcam;ap_()I
-
asBlockEntity
- Specified by:
asBlockEntityin interfaceSingleStackInventory.SingleStackBlockEntityInventory- Mappings:
Namespace Name Mixin selector named asBlockEntityLnet/minecraft/inventory/SingleStackInventory$SingleStackBlockEntityInventory;asBlockEntity()Lnet/minecraft/block/entity/BlockEntity;intermediary method_54080Lnet/minecraft/class_8181$class_9210;method_54080()Lnet/minecraft/class_2586;official wLfox$a;w()Lefj;
-
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 named isValidLnet/minecraft/inventory/Inventory;isValid(ILnet/minecraft/item/ItemStack;)Zintermediary method_5437Lnet/minecraft/class_1263;method_5437(ILnet/minecraft/class_1799;)Zofficial bLcam;b(ILdgs;)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 named canTransferToLnet/minecraft/inventory/Inventory;canTransferTo(Lnet/minecraft/inventory/Inventory;ILnet/minecraft/item/ItemStack;)Zintermediary method_49104Lnet/minecraft/class_1263;method_49104(Lnet/minecraft/class_1263;ILnet/minecraft/class_1799;)Zofficial aLcam;a(Lcam;ILdgs;)Z
-
onBlockReplaced
- Overrides:
onBlockReplacedin classBlockEntity- Mappings:
Namespace Name Mixin selector named onBlockReplacedLnet/minecraft/block/entity/BlockEntity;onBlockReplaced(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Vintermediary method_66473Lnet/minecraft/class_2586;method_66473(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial aLefj;a(Lja;Leip;)V
-
setDisc
- Mappings:
Namespace Name Mixin selector named setDiscLnet/minecraft/block/entity/JukeboxBlockEntity;setDisc(Lnet/minecraft/item/ItemStack;)Vintermediary method_49210Lnet/minecraft/class_2619;method_49210(Lnet/minecraft/class_1799;)Vofficial cLegp;c(Ldgs;)V
-
reloadDisc
public void reloadDisc()- Mappings:
Namespace Name Mixin selector named reloadDiscLnet/minecraft/block/entity/JukeboxBlockEntity;reloadDisc()Vintermediary method_60786Lnet/minecraft/class_2619;method_60786()Vofficial xLegp;x()V
-