Package net.minecraft.world.item
Class JukeboxSongPlayer
java.lang.Object
net.minecraft.world.item.JukeboxSongPlayer
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final BlockPos
private final JukeboxSongPlayer.OnSongChanged
static final int
private Holder
<JukeboxSong> private long
-
Constructor Summary
ConstructorDescriptionJukeboxSongPlayer
(JukeboxSongPlayer.OnSongChanged p_350439_, BlockPos p_350395_) -
Method Summary
Modifier and TypeMethodDescriptiongetSong()
long
boolean
void
play
(LevelAccessor p_350839_, Holder<JukeboxSong> p_350771_) void
setSongWithoutPlaying
(Holder<JukeboxSong> p_350889_, long p_350896_) private boolean
private static void
spawnMusicParticles
(LevelAccessor p_350908_, BlockPos p_350387_) void
stop
(LevelAccessor p_350694_, BlockState p_350611_) void
tick
(LevelAccessor p_350845_, BlockState p_350953_)
-
Field Details
-
PLAY_EVENT_INTERVAL_TICKS
public static final int PLAY_EVENT_INTERVAL_TICKS- See Also:
-
ticksSinceSongStarted
private long ticksSinceSongStarted -
song
-
blockPos
-
onSongChanged
-
-
Constructor Details
-
JukeboxSongPlayer
-
-
Method Details
-
isPlaying
public boolean isPlaying() -
getSong
-
getTicksSinceSongStarted
public long getTicksSinceSongStarted() -
setSongWithoutPlaying
-
play
-
stop
-
tick
-
shouldEmitJukeboxPlayingEvent
private boolean shouldEmitJukeboxPlayingEvent() -
spawnMusicParticles
-