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_342806_, BlockPos p_342798_) -
Method Summary
Modifier and TypeMethodDescriptiongetSong()
long
boolean
void
play
(LevelAccessor p_342919_, Holder<JukeboxSong> p_342120_) void
setSongWithoutPlaying
(Holder<JukeboxSong> p_343041_, long p_342718_) private boolean
private static void
spawnMusicParticles
(LevelAccessor p_343992_, BlockPos p_342425_) void
stop
(LevelAccessor p_342211_, BlockState p_342866_) void
tick
(LevelAccessor p_345493_, BlockState p_344954_)
-
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
-