类 MobEffectEvent.Applicable
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.living.LivingEvent
net.neoforged.neoforge.event.entity.living.MobEffectEvent
net.neoforged.neoforge.event.entity.living.MobEffectEvent.Applicable
- 封闭类:
MobEffectEvent
This event is fired to check if a
MobEffectInstance
can be applied to an entity.
It will be fired whenever LivingEntity.canBeAffected(MobEffectInstance)
would be invoked.
-
嵌套类概要
嵌套类从类继承的嵌套类/接口 net.neoforged.neoforge.event.entity.living.MobEffectEvent
MobEffectEvent.Added, MobEffectEvent.Applicable, MobEffectEvent.Expired, MobEffectEvent.Remove
从类继承的嵌套类/接口 net.neoforged.neoforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingVisibilityEvent
从类继承的嵌套类/接口 net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
-
字段概要
字段从类继承的字段 net.neoforged.neoforge.event.entity.living.MobEffectEvent
effectInstance
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明boolean
返回 If the mob effect should be applied or not, based on the current event result。@Nullable Entity
返回 the result of this event, which controls if the mob effect will be applied。void
Changes the result of this event.从类继承的方法 net.neoforged.neoforge.event.entity.living.LivingEvent
getEntity
-
字段详细资料
-
result
-
source
-
-
构造器详细资料
-
Applicable
@Internal public Applicable(LivingEntity living, MobEffectInstance effectInstance, @Nullable @Nullable Entity source)
-
-
方法详细资料
-
getEffectInstance
- 覆盖:
getEffectInstance
在类中MobEffectEvent
-
setResult
Changes the result of this event. -
getResult
返回 the result of this event, which controls if the mob effect will be applied。- 返回:
- the result of this event, which controls if the mob effect will be applied
-
getEffectSource
- 返回:
- the entity source of the effect, or
null
if none exists
-
getApplicationResult
public boolean getApplicationResult()返回 If the mob effect should be applied or not, based on the current event result。- 返回:
- If the mob effect should be applied or not, based on the current event result
-