Class LevelEventHandler
java.lang.Object
net.minecraft.client.renderer.LevelEventHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientLevelprivate final Minecraftprivate final Map<BlockPos, SoundInstance> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidglobalLevelEvent(int type, BlockPos pos, int data) Handles a global level event.voidlevelEvent(int eventType, BlockPos pos, int data) private voidnotifyNearbyEntities(Level level, BlockPos pos, boolean isPlaying) 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> songHolder, BlockPos pos) private voidshootParticles(int data, BlockPos pos, RandomSource random, SimpleParticleType particle) private voidstopJukeboxSong(BlockPos pos) private void
-
Field Details
-
minecraft
-
level
-
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 data, BlockPos pos, RandomSource random, SimpleParticleType particle) -
playJukeboxSong
-
stopJukeboxSong
-
stopJukeboxSongAndNotifyNearby
-
notifyNearbyEntities
-