类 PlayLevelSoundEvent.AtEntity
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.PlayLevelSoundEvent
net.neoforged.neoforge.event.PlayLevelSoundEvent.AtEntity
- 所有已实现的接口:
net.neoforged.bus.api.ICancellableEvent
- 封闭类:
PlayLevelSoundEvent
PlayLevelSoundEvent.AtEntity is fired when a sound is played on the
.
Level
at an Entity
's position.
This event is fired from Level.playSound(net.minecraft.world.entity.Entity, net.minecraft.core.BlockPos, net.minecraft.sounds.SoundEvent, net.minecraft.sounds.SoundSource, float, float)
, Level.playSeededSound(net.minecraft.world.entity.Entity, double, double, double, net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent>, net.minecraft.sounds.SoundSource, float, float, long)
, and
引用无效
LocalPlayer#playSound
This event is cancelable
.
If this event is canceled, the sound is not played.
This event does not have a result.
This event is fired on the NeoForge.EVENT_BUS
.
-
嵌套类概要
从类继承的嵌套类/接口 net.neoforged.neoforge.event.PlayLevelSoundEvent
PlayLevelSoundEvent.AtEntity, PlayLevelSoundEvent.AtPosition
-
字段概要
字段 -
构造器概要
构造器构造器说明AtEntity
(Entity entity, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch) -
方法概要
从类继承的方法 net.neoforged.neoforge.event.PlayLevelSoundEvent
getLevel, getNewPitch, getNewVolume, getOriginalPitch, getOriginalVolume, getSound, getSource, setNewPitch, setNewVolume, setSound, setSource
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
字段详细资料
-
entity
-
-
构造器详细资料
-
AtEntity
public AtEntity(Entity entity, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch)
-
-
方法详细资料
-
getEntity
返回 the entity the sound is being played on。- 返回:
- the entity the sound is being played on
-