Class JukeboxBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.JukeboxBlockEntity
- All Implemented Interfaces:
- Clearable,- Container,- ContainerSingleItem,- IAttachmentHolder,- IBlockEntityExtension,- INBTSerializable<CompoundTag>
- 
Nested Class SummaryNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolderAttachmentHolder.AsField
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate booleanprivate ItemStackprivate longprivate static final intprivate longprivate intFields inherited from class net.minecraft.world.level.block.entity.BlockEntitylevel, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolderATTACHMENTS_NBT_KEYFields inherited from interface net.minecraft.world.ContainerDEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanPlaceItem(int p_273369_, ItemStack p_273689_) booleancanTakeItem(Container p_273497_, int p_273168_, ItemStack p_273785_) intbooleanvoidload(CompoundTag p_155616_) static voidplayRecordTick(Level p_239938_, BlockPos p_239939_, BlockState p_239940_, JukeboxBlockEntity p_239941_) voidprotected voidsaveAdditional(CompoundTag p_187507_) private voidsetHasRecordBlockState(Entity p_273308_, boolean p_273038_) voidsetRecordWithoutPlaying(ItemStack p_272693_) voidsetTheItem(ItemStack p_304781_) private booleanshouldRecordStopPlaying(RecordItem p_273267_) private booleanprivate voidspawnMusicParticles(Level p_270782_, BlockPos p_270940_) splitTheItem(int p_304604_) voidprivate voidprivate voidtick(Level p_273615_, BlockPos p_273143_, BlockState p_273372_) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntityaddEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onlyOpCanSetNbt, removeData, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setData, setLevel, setRemoved, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolderareAttachmentsCompatible, deserializeAttachments, getData, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.ContainercountItem, hasAnyMatching, hasAnyOf, setChanged, startOpen, stopOpenMethods inherited from interface net.minecraft.world.ticks.ContainerSingleItemclearContent, getContainerSize, getItem, isEmpty, removeItem, removeItemNoUpdate, removeTheItem, setItem, stillValidMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHoldergetData, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtensiondeserializeNBT, getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
- 
Field Details- 
SONG_END_PADDINGprivate static final int SONG_END_PADDING- See Also:
 
- 
item
- 
ticksSinceLastEventprivate int ticksSinceLastEvent
- 
tickCountprivate long tickCount
- 
recordStartedTickprivate long recordStartedTick
- 
isPlayingprivate boolean isPlaying
 
- 
- 
Constructor Details- 
JukeboxBlockEntity
 
- 
- 
Method Details- 
load- Overrides:
- loadin class- BlockEntity
 
- 
saveAdditional- Overrides:
- saveAdditionalin class- BlockEntity
 
- 
isRecordPlayingpublic boolean isRecordPlaying()
- 
setHasRecordBlockState
- 
startPlayingpublic void startPlaying()
- 
stopPlayingprivate void stopPlaying()
- 
tick
- 
shouldRecordStopPlaying
- 
shouldSendJukeboxPlayingEventprivate boolean shouldSendJukeboxPlayingEvent()
- 
getTheItem- Specified by:
- getTheItemin interface- ContainerSingleItem
 
- 
splitTheItem- Specified by:
- splitTheItemin interface- ContainerSingleItem
 
- 
setTheItem- Specified by:
- setTheItemin interface- ContainerSingleItem
 
- 
getMaxStackSizepublic int getMaxStackSize()- Specified by:
- getMaxStackSizein interface- Container
 
- 
getContainerBlockEntity- Specified by:
- getContainerBlockEntityin interface- ContainerSingleItem
 
- 
canPlaceItem- Specified by:
- canPlaceItemin interface- Container
 
- 
canTakeItem- Specified by:
- canTakeItemin interface- Container
 
- 
spawnMusicParticles
- 
popOutRecordpublic void popOutRecord()
- 
playRecordTickpublic static void playRecordTick(Level p_239938_, BlockPos p_239939_, BlockState p_239940_, JukeboxBlockEntity p_239941_) 
- 
setRecordWithoutPlaying
 
-