Class MobEffectInstance

java.lang.Object
net.minecraft.world.effect.MobEffectInstance
All Implemented Interfaces:
Comparable<MobEffectInstance>

public class MobEffectInstance extends Object implements Comparable<MobEffectInstance>
  • Field Details

  • Constructor Details

    • MobEffectInstance

      public MobEffectInstance(Holder<MobEffect> p_333937_)
    • MobEffectInstance

      public MobEffectInstance(Holder<MobEffect> p_332556_, int p_19523_)
    • MobEffectInstance

      public MobEffectInstance(Holder<MobEffect> p_334453_, int p_328066_, int p_330997_)
    • MobEffectInstance

      public MobEffectInstance(Holder<MobEffect> p_327781_, int p_19529_, int p_19530_, boolean p_19531_, boolean p_19532_)
    • MobEffectInstance

      public MobEffectInstance(Holder<MobEffect> p_333122_, int p_216888_, int p_216889_, boolean p_216890_, boolean p_216891_, boolean p_216892_)
    • MobEffectInstance

      public MobEffectInstance(Holder<MobEffect> p_334558_, int p_19519_, int p_19520_, boolean p_332448_, boolean p_327855_, boolean p_334281_, @Nullable MobEffectInstance p_332569_)
    • MobEffectInstance

      public MobEffectInstance(MobEffectInstance p_19543_)
    • MobEffectInstance

      private MobEffectInstance(Holder<MobEffect> p_330051_, MobEffectInstance.Details p_332322_)
  • Method Details

    • asDetails

      private MobEffectInstance.Details asDetails()
    • getBlendFactor

      public float getBlendFactor(LivingEntity p_333473_, float p_327866_)
    • getParticleOptions

      public ParticleOptions getParticleOptions()
    • setDetailsFrom

      void setDetailsFrom(MobEffectInstance p_19549_)
    • update

      public boolean update(MobEffectInstance p_19559_)
    • isShorterDurationThan

      private boolean isShorterDurationThan(MobEffectInstance p_268133_)
    • isInfiniteDuration

      public boolean isInfiniteDuration()
    • endsWithin

      public boolean endsWithin(int p_268088_)
    • mapDuration

      public int mapDuration(it.unimi.dsi.fastutil.ints.Int2IntFunction p_268089_)
    • getEffect

      public Holder<MobEffect> getEffect()
    • getDuration

      public int getDuration()
    • getAmplifier

      public int getAmplifier()
    • isAmbient

      public boolean isAmbient()
    • isVisible

      public boolean isVisible()
    • showIcon

      public boolean showIcon()
    • tick

      public boolean tick(LivingEntity p_19553_, Runnable p_19554_)
    • hasRemainingDuration

      private boolean hasRemainingDuration()
    • tickDownDuration

      private int tickDownDuration()
    • onEffectStarted

      public void onEffectStarted(LivingEntity p_297679_)
    • onMobRemoved

      public void onMobRemoved(LivingEntity p_329318_, Entity.RemovalReason p_333232_)
    • onMobHurt

      public void onMobHurt(LivingEntity p_327684_, DamageSource p_328403_, float p_331463_)
    • getDescriptionId

      public String getDescriptionId()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • describeDuration

      private String describeDuration()
    • equals

      public boolean equals(Object p_19574_)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • save

      public Tag save()
    • load

      @Nullable public static MobEffectInstance load(CompoundTag p_19561_)
    • compareTo

      public int compareTo(MobEffectInstance p_19566_)
      Specified by:
      compareTo in interface Comparable<MobEffectInstance>
    • onEffectAdded

      public void onEffectAdded(LivingEntity p_334348_)
    • is

      public boolean is(Holder<MobEffect> p_329529_)
    • copyBlendState

      public void copyBlendState(MobEffectInstance p_335404_)
    • skipBlending

      public void skipBlending()