Package net.minecraft.client.renderer
Class LevelEventHandler
java.lang.Object
net.minecraft.client.renderer.LevelEventHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Levelprivate final LevelRendererprivate final Minecraftprivate final Map<BlockPos, SoundInstance> -
Constructor Summary
ConstructorsConstructorDescriptionLevelEventHandler(Minecraft pMinecraft, Level pLevel, LevelRenderer pLevelRenderer) -
Method Summary
Modifier and TypeMethodDescriptionvoidglobalLevelEvent(int pType, BlockPos pPos, int pData) Handles a global level event.voidlevelEvent(int pType, BlockPos pPos, int pData) private voidnotifyNearbyEntities(Level pLevel, BlockPos pPos, boolean pPlaying) Notifies living entities in a 3 block range of the specifiedposthat a record is or isn't playing nearby, dependent on the specifiedplayingparameter.private voidplayJukeboxSong(Holder<JukeboxSong> pSong, BlockPos pPos) private voidshootParticles(int pDirection, BlockPos pPos, RandomSource pRandom, SimpleParticleType pParticleType) private voidstopJukeboxSong(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 specifiedposthat a record is or isn't playing nearby, dependent on the specifiedplayingparameter. This is used to make parrots start or stop partying.
-