Class JukeboxBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.JukeboxBlockEntity
- All Implemented Interfaces:
Clearable
,Container
,ContainerSingleItem
,ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,ICapabilitySerializable<CompoundTag>
,IForgeBlockEntity
,INBTSerializable<CompoundTag>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private final NonNullList<ItemStack>
private long
private static final int
private long
private int
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE
Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canPlaceItem
(int p_273369_, ItemStack p_273689_) boolean
canTakeItem
(Container p_273497_, int p_273168_, ItemStack p_273785_) getItem
(int p_273280_) int
boolean
void
load
(CompoundTag p_155616_) static void
playRecordTick
(Level p_239938_, BlockPos p_239939_, BlockState p_239940_, JukeboxBlockEntity p_239941_) void
removeItem
(int p_273514_, int p_273414_) protected void
saveAdditional
(CompoundTag p_187507_) private void
setHasRecordBlockState
(Entity p_273308_, boolean p_273038_) void
void
setRecordWithoutPlaying
(ItemStack p_272693_) private boolean
shouldRecordStopPlaying
(RecordItem p_273267_) private boolean
private void
spawnMusicParticles
(Level p_270782_, BlockPos p_270940_) void
boolean
stillValid
(Player p_273466_) private void
private void
tick
(Level p_273615_, BlockPos p_273143_, BlockState p_273372_) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEvent
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.Container
countItem, hasAnyMatching, hasAnyOf, setChanged, startOpen, stopOpen
Methods inherited from interface net.minecraft.world.ticks.ContainerSingleItem
clearContent, getContainerSize, getFirstItem, isEmpty, removeFirstItem, removeItemNoUpdate, setFirstItem
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
Field Details
-
SONG_END_PADDING
private static final int SONG_END_PADDING- See Also:
-
items
-
ticksSinceLastEvent
private int ticksSinceLastEvent -
tickCount
private long tickCount -
recordStartedTick
private long recordStartedTick -
isPlaying
private boolean isPlaying
-
-
Constructor Details
-
JukeboxBlockEntity
-
-
Method Details
-
load
- Overrides:
load
in classBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBlockEntity
-
isRecordPlaying
public boolean isRecordPlaying() -
setHasRecordBlockState
-
startPlaying
public void startPlaying() -
stopPlaying
private void stopPlaying() -
tick
-
shouldRecordStopPlaying
-
shouldSendJukeboxPlayingEvent
private boolean shouldSendJukeboxPlayingEvent() -
getItem
-
removeItem
- Specified by:
removeItem
in interfaceContainer
-
setItem
-
getMaxStackSize
public int getMaxStackSize()- Specified by:
getMaxStackSize
in interfaceContainer
-
stillValid
- Specified by:
stillValid
in interfaceContainer
-
canPlaceItem
- Specified by:
canPlaceItem
in interfaceContainer
-
canTakeItem
- Specified by:
canTakeItem
in interfaceContainer
-
spawnMusicParticles
-
popOutRecord
public void popOutRecord() -
playRecordTick
public static void playRecordTick(Level p_239938_, BlockPos p_239939_, BlockState p_239940_, JukeboxBlockEntity p_239941_) -
setRecordWithoutPlaying
-