Class StatusEffectInstance

java.lang.Object
net.minecraft.entity.effect.StatusEffectInstance
All Implemented Interfaces:
Comparable<StatusEffectInstance>

public class StatusEffectInstance extends Object implements Comparable<StatusEffectInstance>
Mappings:
Namespace Name
named net/minecraft/entity/effect/StatusEffectInstance
intermediary net/minecraft/class_1293
official bse
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/entity/effect/StatusEffectInstance;LOGGER:Lorg/slf4j/Logger;
      intermediary field_5897 Lnet/minecraft/class_1293;field_5897:Lorg/slf4j/Logger;
      official f Lbse;f:Lorg/slf4j/Logger;
    • INFINITE

      public static final int INFINITE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named INFINITE Lnet/minecraft/entity/effect/StatusEffectInstance;INFINITE:I
      intermediary field_42106 Lnet/minecraft/class_1293;field_42106:I
      official a Lbse;a:I
    • MIN_AMPLIFIER

      public static final int MIN_AMPLIFIER
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MIN_AMPLIFIER Lnet/minecraft/entity/effect/StatusEffectInstance;MIN_AMPLIFIER:I
      intermediary field_49014 Lnet/minecraft/class_1293;field_49014:I
      official b Lbse;b:I
    • MAX_AMPLIFIER

      public static final int MAX_AMPLIFIER
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_AMPLIFIER Lnet/minecraft/entity/effect/StatusEffectInstance;MAX_AMPLIFIER:I
      intermediary field_49015 Lnet/minecraft/class_1293;field_49015:I
      official c Lbse;c:I
    • CODEC

      public static final com.mojang.serialization.Codec<StatusEffectInstance> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/entity/effect/StatusEffectInstance;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_48821 Lnet/minecraft/class_1293;field_48821:Lcom/mojang/serialization/Codec;
      official d Lbse;d:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,StatusEffectInstance> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/entity/effect/StatusEffectInstance;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_49207 Lnet/minecraft/class_1293;field_49207:Lnet/minecraft/class_9139;
      official e Lbse;e:Lzn;
    • type

      private final RegistryEntry<StatusEffect> type
      Mappings:
      Namespace Name Mixin selector
      named type Lnet/minecraft/entity/effect/StatusEffectInstance;type:Lnet/minecraft/registry/entry/RegistryEntry;
      intermediary field_5896 Lnet/minecraft/class_1293;field_5896:Lnet/minecraft/class_6880;
      official g Lbse;g:Lji;
    • duration

      private int duration
      Mappings:
      Namespace Name Mixin selector
      named duration Lnet/minecraft/entity/effect/StatusEffectInstance;duration:I
      intermediary field_5895 Lnet/minecraft/class_1293;field_5895:I
      official h Lbse;h:I
    • amplifier

      private int amplifier
      Mappings:
      Namespace Name Mixin selector
      named amplifier Lnet/minecraft/entity/effect/StatusEffectInstance;amplifier:I
      intermediary field_5893 Lnet/minecraft/class_1293;field_5893:I
      official i Lbse;i:I
    • ambient

      private boolean ambient
      Mappings:
      Namespace Name Mixin selector
      named ambient Lnet/minecraft/entity/effect/StatusEffectInstance;ambient:Z
      intermediary field_5892 Lnet/minecraft/class_1293;field_5892:Z
      official j Lbse;j:Z
    • showParticles

      private boolean showParticles
      Mappings:
      Namespace Name Mixin selector
      named showParticles Lnet/minecraft/entity/effect/StatusEffectInstance;showParticles:Z
      intermediary field_5890 Lnet/minecraft/class_1293;field_5890:Z
      official k Lbse;k:Z
    • showIcon

      private boolean showIcon
      Mappings:
      Namespace Name Mixin selector
      named showIcon Lnet/minecraft/entity/effect/StatusEffectInstance;showIcon:Z
      intermediary field_5889 Lnet/minecraft/class_1293;field_5889:Z
      official l Lbse;l:Z
    • hiddenEffect

      The effect hidden when upgrading effects. Duration decreases with this effect.

      This exists so that long-duration low-amplifier effects reappears after short-duration high-amplifier effects run out.

      Mappings:
      Namespace Name Mixin selector
      named hiddenEffect Lnet/minecraft/entity/effect/StatusEffectInstance;hiddenEffect:Lnet/minecraft/entity/effect/StatusEffectInstance;
      intermediary field_21830 Lnet/minecraft/class_1293;field_21830:Lnet/minecraft/class_1293;
      official m Lbse;m:Lbse;
    • fading

      private final StatusEffectInstance.Fading fading
      Mappings:
      Namespace Name Mixin selector
      named fading Lnet/minecraft/entity/effect/StatusEffectInstance;fading:Lnet/minecraft/entity/effect/StatusEffectInstance$Fading;
      intermediary field_47739 Lnet/minecraft/class_1293;field_47739:Lnet/minecraft/class_1293$class_9063;
      official n Lbse;n:Lbse$a;
  • Constructor Details

    • StatusEffectInstance

      public StatusEffectInstance(RegistryEntry<StatusEffect> effect)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/effect/StatusEffectInstance;<init>(Lnet/minecraft/registry/entry/RegistryEntry;)V
      intermediary <init> Lnet/minecraft/class_1293;<init>(Lnet/minecraft/class_6880;)V
      official <init> Lbse;<init>(Lji;)V
    • StatusEffectInstance

      public StatusEffectInstance(RegistryEntry<StatusEffect> effect, int duration)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/effect/StatusEffectInstance;<init>(Lnet/minecraft/registry/entry/RegistryEntry;I)V
      intermediary <init> Lnet/minecraft/class_1293;<init>(Lnet/minecraft/class_6880;I)V
      official <init> Lbse;<init>(Lji;I)V
    • StatusEffectInstance

      public StatusEffectInstance(RegistryEntry<StatusEffect> effect, int duration, int amplifier)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/effect/StatusEffectInstance;<init>(Lnet/minecraft/registry/entry/RegistryEntry;II)V
      intermediary <init> Lnet/minecraft/class_1293;<init>(Lnet/minecraft/class_6880;II)V
      official <init> Lbse;<init>(Lji;II)V
    • StatusEffectInstance

      public StatusEffectInstance(RegistryEntry<StatusEffect> effect, int duration, int amplifier, boolean ambient, boolean visible)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/effect/StatusEffectInstance;<init>(Lnet/minecraft/registry/entry/RegistryEntry;IIZZ)V
      intermediary <init> Lnet/minecraft/class_1293;<init>(Lnet/minecraft/class_6880;IIZZ)V
      official <init> Lbse;<init>(Lji;IIZZ)V
    • StatusEffectInstance

      public StatusEffectInstance(RegistryEntry<StatusEffect> effect, int duration, int amplifier, boolean ambient, boolean showParticles, boolean showIcon)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/effect/StatusEffectInstance;<init>(Lnet/minecraft/registry/entry/RegistryEntry;IIZZZ)V
      intermediary <init> Lnet/minecraft/class_1293;<init>(Lnet/minecraft/class_6880;IIZZZ)V
      official <init> Lbse;<init>(Lji;IIZZZ)V
    • StatusEffectInstance

      public StatusEffectInstance(RegistryEntry<StatusEffect> effect, int duration, int amplifier, boolean ambient, boolean showParticles, boolean showIcon, @Nullable @Nullable StatusEffectInstance hiddenEffect)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/effect/StatusEffectInstance;<init>(Lnet/minecraft/registry/entry/RegistryEntry;IIZZZLnet/minecraft/entity/effect/StatusEffectInstance;)V
      intermediary <init> Lnet/minecraft/class_1293;<init>(Lnet/minecraft/class_6880;IIZZZLnet/minecraft/class_1293;)V
      official <init> Lbse;<init>(Lji;IIZZZLbse;)V
    • StatusEffectInstance

      public StatusEffectInstance(StatusEffectInstance instance)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/effect/StatusEffectInstance;<init>(Lnet/minecraft/entity/effect/StatusEffectInstance;)V
      intermediary <init> Lnet/minecraft/class_1293;<init>(Lnet/minecraft/class_1293;)V
      official <init> Lbse;<init>(Lbse;)V
    • StatusEffectInstance

      private StatusEffectInstance(RegistryEntry<StatusEffect> effect, StatusEffectInstance.Parameters parameters)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/effect/StatusEffectInstance;<init>(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/entity/effect/StatusEffectInstance$Parameters;)V
      intermediary <init> Lnet/minecraft/class_1293;<init>(Lnet/minecraft/class_6880;Lnet/minecraft/class_1293$class_9195;)V
      official <init> Lbse;<init>(Lji;Lbse$b;)V
  • Method Details

    • asParameters

      private StatusEffectInstance.Parameters asParameters()
      Mappings:
      Namespace Name Mixin selector
      named asParameters Lnet/minecraft/entity/effect/StatusEffectInstance;asParameters()Lnet/minecraft/entity/effect/StatusEffectInstance$Parameters;
      intermediary method_56668 Lnet/minecraft/class_1293;method_56668()Lnet/minecraft/class_1293$class_9195;
      official l Lbse;l()Lbse$b;
    • getFadeFactor

      public float getFadeFactor(LivingEntity entity, float tickDelta)
      Returns the factor (multiplier) for effect fade-in and fade-out.

      The return value is between 0.0f and 1.0f (both inclusive).

      Returns:
      the factor (multiplier) for effect fade-in and fade-out
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getFadeFactor Lnet/minecraft/entity/effect/StatusEffectInstance;getFadeFactor(Lnet/minecraft/entity/LivingEntity;F)F
      intermediary method_55653 Lnet/minecraft/class_1293;method_55653(Lnet/minecraft/class_1309;F)F
      official a Lbse;a(Lbtr;F)F
    • createParticle

      public ParticleEffect createParticle()
      Mappings:
      Namespace Name Mixin selector
      named createParticle Lnet/minecraft/entity/effect/StatusEffectInstance;createParticle()Lnet/minecraft/particle/ParticleEffect;
      intermediary method_58148 Lnet/minecraft/class_1293;method_58148()Lnet/minecraft/class_2394;
      official a Lbse;a()Llg;
    • copyFrom

      void copyFrom(StatusEffectInstance that)
      Mappings:
      Namespace Name Mixin selector
      named copyFrom Lnet/minecraft/entity/effect/StatusEffectInstance;copyFrom(Lnet/minecraft/entity/effect/StatusEffectInstance;)V
      intermediary method_24276 Lnet/minecraft/class_1293;method_24276(Lnet/minecraft/class_1293;)V
      official a Lbse;a(Lbse;)V
    • upgrade

      public boolean upgrade(StatusEffectInstance that)
      Mappings:
      Namespace Name Mixin selector
      named upgrade Lnet/minecraft/entity/effect/StatusEffectInstance;upgrade(Lnet/minecraft/entity/effect/StatusEffectInstance;)Z
      intermediary method_5590 Lnet/minecraft/class_1293;method_5590(Lnet/minecraft/class_1293;)Z
      official b Lbse;b(Lbse;)Z
    • lastsShorterThan

      private boolean lastsShorterThan(StatusEffectInstance effect)
      Mappings:
      Namespace Name Mixin selector
      named lastsShorterThan Lnet/minecraft/entity/effect/StatusEffectInstance;lastsShorterThan(Lnet/minecraft/entity/effect/StatusEffectInstance;)Z
      intermediary method_48561 Lnet/minecraft/class_1293;method_48561(Lnet/minecraft/class_1293;)Z
      official e Lbse;e(Lbse;)Z
    • isInfinite

      public boolean isInfinite()
      Mappings:
      Namespace Name Mixin selector
      named isInfinite Lnet/minecraft/entity/effect/StatusEffectInstance;isInfinite()Z
      intermediary method_48559 Lnet/minecraft/class_1293;method_48559()Z
      official b Lbse;b()Z
    • isDurationBelow

      public boolean isDurationBelow(int duration)
      Mappings:
      Namespace Name Mixin selector
      named isDurationBelow Lnet/minecraft/entity/effect/StatusEffectInstance;isDurationBelow(I)Z
      intermediary method_48557 Lnet/minecraft/class_1293;method_48557(I)Z
      official a Lbse;a(I)Z
    • mapDuration

      public int mapDuration(Int2IntFunction mapper)
      Mappings:
      Namespace Name Mixin selector
      named mapDuration Lnet/minecraft/entity/effect/StatusEffectInstance;mapDuration(Lit/unimi/dsi/fastutil/ints/Int2IntFunction;)I
      intermediary method_48558 Lnet/minecraft/class_1293;method_48558(Lit/unimi/dsi/fastutil/ints/Int2IntFunction;)I
      official a Lbse;a(Lit/unimi/dsi/fastutil/ints/Int2IntFunction;)I
    • getEffectType

      public RegistryEntry<StatusEffect> getEffectType()
      Mappings:
      Namespace Name Mixin selector
      named getEffectType Lnet/minecraft/entity/effect/StatusEffectInstance;getEffectType()Lnet/minecraft/registry/entry/RegistryEntry;
      intermediary method_5579 Lnet/minecraft/class_1293;method_5579()Lnet/minecraft/class_6880;
      official c Lbse;c()Lji;
    • getDuration

      public int getDuration()
      Mappings:
      Namespace Name Mixin selector
      named getDuration Lnet/minecraft/entity/effect/StatusEffectInstance;getDuration()I
      intermediary method_5584 Lnet/minecraft/class_1293;method_5584()I
      official d Lbse;d()I
    • getAmplifier

      public int getAmplifier()
      Mappings:
      Namespace Name Mixin selector
      named getAmplifier Lnet/minecraft/entity/effect/StatusEffectInstance;getAmplifier()I
      intermediary method_5578 Lnet/minecraft/class_1293;method_5578()I
      official e Lbse;e()I
    • isAmbient

      public boolean isAmbient()
      Mappings:
      Namespace Name Mixin selector
      named isAmbient Lnet/minecraft/entity/effect/StatusEffectInstance;isAmbient()Z
      intermediary method_5591 Lnet/minecraft/class_1293;method_5591()Z
      official f Lbse;f()Z
    • shouldShowParticles

      public boolean shouldShowParticles()
      Mappings:
      Namespace Name Mixin selector
      named shouldShowParticles Lnet/minecraft/entity/effect/StatusEffectInstance;shouldShowParticles()Z
      intermediary method_5581 Lnet/minecraft/class_1293;method_5581()Z
      official g Lbse;g()Z
    • shouldShowIcon

      public boolean shouldShowIcon()
      Mappings:
      Namespace Name Mixin selector
      named shouldShowIcon Lnet/minecraft/entity/effect/StatusEffectInstance;shouldShowIcon()Z
      intermediary method_5592 Lnet/minecraft/class_1293;method_5592()Z
      official h Lbse;h()Z
    • update

      public boolean update(LivingEntity entity, Runnable overwriteCallback)
      Mappings:
      Namespace Name Mixin selector
      named update Lnet/minecraft/entity/effect/StatusEffectInstance;update(Lnet/minecraft/entity/LivingEntity;Ljava/lang/Runnable;)Z
      intermediary method_5585 Lnet/minecraft/class_1293;method_5585(Lnet/minecraft/class_1309;Ljava/lang/Runnable;)Z
      official a Lbse;a(Lbtr;Ljava/lang/Runnable;)Z
    • isActive

      private boolean isActive()
      Mappings:
      Namespace Name Mixin selector
      named isActive Lnet/minecraft/entity/effect/StatusEffectInstance;isActive()Z
      intermediary method_48562 Lnet/minecraft/class_1293;method_48562()Z
      official m Lbse;m()Z
    • updateDuration

      private int updateDuration()
      Mappings:
      Namespace Name Mixin selector
      named updateDuration Lnet/minecraft/entity/effect/StatusEffectInstance;updateDuration()I
      intermediary method_5588 Lnet/minecraft/class_1293;method_5588()I
      official n Lbse;n()I
    • onApplied

      public void onApplied(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      named onApplied Lnet/minecraft/entity/effect/StatusEffectInstance;onApplied(Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_52523 Lnet/minecraft/class_1293;method_52523(Lnet/minecraft/class_1309;)V
      official a Lbse;a(Lbtr;)V
    • onEntityRemoval

      public void onEntityRemoval(LivingEntity entity, Entity.RemovalReason reason)
      Mappings:
      Namespace Name Mixin selector
      named onEntityRemoval Lnet/minecraft/entity/effect/StatusEffectInstance;onEntityRemoval(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity$RemovalReason;)V
      intermediary method_58622 Lnet/minecraft/class_1293;method_58622(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297$class_5529;)V
      official a Lbse;a(Lbtr;Lbsw$c;)V
    • onEntityDamage

      public void onEntityDamage(LivingEntity entity, DamageSource source, float amount)
      Mappings:
      Namespace Name Mixin selector
      named onEntityDamage Lnet/minecraft/entity/effect/StatusEffectInstance;onEntityDamage(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/damage/DamageSource;F)V
      intermediary method_58621 Lnet/minecraft/class_1293;method_58621(Lnet/minecraft/class_1309;Lnet/minecraft/class_1282;F)V
      official a Lbse;a(Lbtr;Lbrp;F)V
    • getTranslationKey

      public String getTranslationKey()
      Mappings:
      Namespace Name Mixin selector
      named getTranslationKey Lnet/minecraft/entity/effect/StatusEffectInstance;getTranslationKey()Ljava/lang/String;
      intermediary method_5586 Lnet/minecraft/class_1293;method_5586()Ljava/lang/String;
      official i Lbse;i()Ljava/lang/String;
    • toString

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

      private String getDurationString()
      Mappings:
      Namespace Name Mixin selector
      named getDurationString Lnet/minecraft/entity/effect/StatusEffectInstance;getDurationString()Ljava/lang/String;
      intermediary method_48563 Lnet/minecraft/class_1293;method_48563()Ljava/lang/String;
      official o Lbse;o()Ljava/lang/String;
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      named equals Lnet/minecraft/entity/effect/StatusEffectInstance;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_1293;equals(Ljava/lang/Object;)Z
      official equals Lbse;equals(Ljava/lang/Object;)Z
    • hashCode

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

      public NbtElement writeNbt()
      Mappings:
      Namespace Name Mixin selector
      named writeNbt Lnet/minecraft/entity/effect/StatusEffectInstance;writeNbt()Lnet/minecraft/nbt/NbtElement;
      intermediary method_5582 Lnet/minecraft/class_1293;method_5582()Lnet/minecraft/class_2520;
      official j Lbse;j()Lvp;
    • fromNbt

      @Nullable public static @Nullable StatusEffectInstance fromNbt(NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      named fromNbt Lnet/minecraft/entity/effect/StatusEffectInstance;fromNbt(Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/entity/effect/StatusEffectInstance;
      intermediary method_5583 Lnet/minecraft/class_1293;method_5583(Lnet/minecraft/class_2487;)Lnet/minecraft/class_1293;
      official a Lbse;a(Lus;)Lbse;
    • compareTo

      public int compareTo(StatusEffectInstance statusEffectInstance)
      Specified by:
      compareTo in interface Comparable<StatusEffectInstance>
      Mappings:
      Namespace Name Mixin selector
      named compareTo Lnet/minecraft/entity/effect/StatusEffectInstance;compareTo(Lnet/minecraft/entity/effect/StatusEffectInstance;)I
      intermediary method_5587 Lnet/minecraft/class_1293;method_5587(Lnet/minecraft/class_1293;)I
      official c Lbse;c(Lbse;)I
    • playApplySound

      public void playApplySound(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      named playApplySound Lnet/minecraft/entity/effect/StatusEffectInstance;playApplySound(Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_58623 Lnet/minecraft/class_1293;method_58623(Lnet/minecraft/class_1309;)V
      official b Lbse;b(Lbtr;)V
    • equals

      public boolean equals(RegistryEntry<StatusEffect> effect)
      Mappings:
      Namespace Name Mixin selector
      named equals Lnet/minecraft/entity/effect/StatusEffectInstance;equals(Lnet/minecraft/registry/entry/RegistryEntry;)Z
      intermediary method_55654 Lnet/minecraft/class_1293;method_55654(Lnet/minecraft/class_6880;)Z
      official a Lbse;a(Lji;)Z
    • copyFadingFrom

      public void copyFadingFrom(StatusEffectInstance effect)
      Mappings:
      Namespace Name Mixin selector
      named copyFadingFrom Lnet/minecraft/entity/effect/StatusEffectInstance;copyFadingFrom(Lnet/minecraft/entity/effect/StatusEffectInstance;)V
      intermediary method_55656 Lnet/minecraft/class_1293;method_55656(Lnet/minecraft/class_1293;)V
      official d Lbse;d(Lbse;)V
    • skipFading

      public void skipFading()
      Skips fade-in or fade-out currently in progress, instantly setting it to the final state (factor 1.0f or 0.0f, depending on the effect's duration).
      Mappings:
      Namespace Name Mixin selector
      named skipFading Lnet/minecraft/entity/effect/StatusEffectInstance;skipFading()V
      intermediary method_55657 Lnet/minecraft/class_1293;method_55657()V
      official k Lbse;k()V