Package icu.suc.mc.serverevents
Interface ServerEvents.LivingEntity.Effect.Override
- Enclosing class:
ServerEvents.LivingEntity.Effect
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanoverrideEffect(net.minecraft.world.entity.LivingEntity affectedEntity, @NotNull net.minecraft.world.effect.MobEffectInstance oldEffect, @NotNull net.minecraft.world.effect.MobEffectInstance newEffect, net.minecraft.world.entity.Entity sourceEntity, boolean override) Called to determine whether a new effect should override an existing effect.
-
Method Details
-
overrideEffect
boolean overrideEffect(@NotNull net.minecraft.world.entity.LivingEntity affectedEntity, @NotNull @NotNull net.minecraft.world.effect.MobEffectInstance oldEffect, @NotNull @NotNull net.minecraft.world.effect.MobEffectInstance newEffect, @Nullable net.minecraft.world.entity.Entity sourceEntity, boolean override) Called to determine whether a new effect should override an existing effect.- Parameters:
affectedEntity- the entity with the existing effectoldEffect- the current effect instancenewEffect- the new effect instance to applysourceEntity- the entity causing the effect, ornullif no source is specifiedoverride- whether the effect should be overridden- Returns:
trueif the effect should be overridden, otherwisefalse
-