Package net.minecraft.client.renderer
Class LevelEventHandler
java.lang.Object
net.minecraft.client.renderer.LevelEventHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Level
private final LevelRenderer
private final Minecraft
private final Map
<BlockPos, SoundInstance> -
Constructor Summary
ConstructorsConstructorDescriptionLevelEventHandler
(Minecraft pMinecraft, Level pLevel, LevelRenderer pLevelRenderer) -
Method Summary
Modifier and TypeMethodDescriptionvoid
globalLevelEvent
(int pType, BlockPos pPos, int pData) Handles a global level event.void
levelEvent
(int pType, BlockPos pPos, int pData) private void
notifyNearbyEntities
(Level pLevel, BlockPos pPos, boolean pPlaying) Notifies living entities in a 3 block range of the specifiedpos
that a record is or isn't playing nearby, dependent on the specifiedplaying
parameter.private void
playJukeboxSong
(Holder<JukeboxSong> pSong, BlockPos pPos) private void
shootParticles
(int pDirection, BlockPos pPos, RandomSource pRandom, SimpleParticleType pParticleType) private void
stopJukeboxSong
(BlockPos pPos) private void
-
Field Details
-
minecraft
-
level
-
levelRenderer
-
playingJukeboxSongs
-
-
Constructor Details
-
LevelEventHandler
-
-
Method Details
-
globalLevelEvent
Handles a global level event. This includes playing sounds that should be heard by any player, regardless of position and dimension, such as the Wither spawning. -
levelEvent
-
shootParticles
private void shootParticles(int pDirection, BlockPos pPos, RandomSource pRandom, SimpleParticleType pParticleType) -
playJukeboxSong
-
stopJukeboxSong
-
stopJukeboxSongAndNotifyNearby
-
notifyNearbyEntities
Notifies living entities in a 3 block range of the specifiedpos
that a record is or isn't playing nearby, dependent on the specifiedplaying
parameter. This is used to make parrots start or stop partying.
-