Class StatusEffect

java.lang.Object
net.minecraft.entity.effect.StatusEffect
All Implemented Interfaces:
ToggleableFeature
Direct Known Subclasses:
AbsorptionStatusEffect, BadOmenStatusEffect, HungerStatusEffect, InfestedStatusEffect, InstantStatusEffect, OozingStatusEffect, PoisonStatusEffect, RaidOmenStatusEffect, RegenerationStatusEffect, WeavingStatusEffect, WindChargedStatusEffect, WitherStatusEffect

public class StatusEffect extends Object implements ToggleableFeature
Mappings:
Namespace Name
named net/minecraft/entity/effect/StatusEffect
intermediary net/minecraft/class_1291
official bsc
  • Field Details

    • AMBIENT_PARTICLE_ALPHA

      private static final int AMBIENT_PARTICLE_ALPHA
      Mappings:
      Namespace Name Mixin selector
      named AMBIENT_PARTICLE_ALPHA Lnet/minecraft/entity/effect/StatusEffect;AMBIENT_PARTICLE_ALPHA:I
      intermediary field_49789 Lnet/minecraft/class_1291;field_49789:I
      official a Lbsc;a:I
    • attributeModifiers

      Mappings:
      Namespace Name Mixin selector
      named attributeModifiers Lnet/minecraft/entity/effect/StatusEffect;attributeModifiers:Ljava/util/Map;
      intermediary field_5885 Lnet/minecraft/class_1291;field_5885:Ljava/util/Map;
      official b Lbsc;b:Ljava/util/Map;
    • category

      private final StatusEffectCategory category
      Mappings:
      Namespace Name Mixin selector
      named category Lnet/minecraft/entity/effect/StatusEffect;category:Lnet/minecraft/entity/effect/StatusEffectCategory;
      intermediary field_18270 Lnet/minecraft/class_1291;field_18270:Lnet/minecraft/class_4081;
      official c Lbsc;c:Lbsd;
    • color

      private final int color
      Mappings:
      Namespace Name Mixin selector
      named color Lnet/minecraft/entity/effect/StatusEffect;color:I
      intermediary field_5886 Lnet/minecraft/class_1291;field_5886:I
      official d Lbsc;d:I
    • particleFactory

      private final Function<StatusEffectInstance,ParticleEffect> particleFactory
      Mappings:
      Namespace Name Mixin selector
      named particleFactory Lnet/minecraft/entity/effect/StatusEffect;particleFactory:Ljava/util/function/Function;
      intermediary field_49790 Lnet/minecraft/class_1291;field_49790:Ljava/util/function/Function;
      official e Lbsc;e:Ljava/util/function/Function;
    • translationKey

      @Nullable private @Nullable String translationKey
      Mappings:
      Namespace Name Mixin selector
      named translationKey Lnet/minecraft/entity/effect/StatusEffect;translationKey:Ljava/lang/String;
      intermediary field_5883 Lnet/minecraft/class_1291;field_5883:Ljava/lang/String;
      official f Lbsc;f:Ljava/lang/String;
    • fadeTicks

      private int fadeTicks
      Mappings:
      Namespace Name Mixin selector
      named fadeTicks Lnet/minecraft/entity/effect/StatusEffect;fadeTicks:I
      intermediary field_47738 Lnet/minecraft/class_1291;field_47738:I
      official g Lbsc;g:I
    • applySound

      private Optional<SoundEvent> applySound
      Mappings:
      Namespace Name Mixin selector
      named applySound Lnet/minecraft/entity/effect/StatusEffect;applySound:Ljava/util/Optional;
      intermediary field_50114 Lnet/minecraft/class_1291;field_50114:Ljava/util/Optional;
      official h Lbsc;h:Ljava/util/Optional;
    • requiredFeatures

      private FeatureSet requiredFeatures
      Mappings:
      Namespace Name Mixin selector
      named requiredFeatures Lnet/minecraft/entity/effect/StatusEffect;requiredFeatures:Lnet/minecraft/resource/featuretoggle/FeatureSet;
      intermediary field_50115 Lnet/minecraft/class_1291;field_50115:Lnet/minecraft/class_7699;
      official i Lbsc;i:Lcpn;
  • Constructor Details

    • StatusEffect

      protected StatusEffect(StatusEffectCategory category, int color)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/effect/StatusEffect;<init>(Lnet/minecraft/entity/effect/StatusEffectCategory;I)V
      intermediary <init> Lnet/minecraft/class_1291;<init>(Lnet/minecraft/class_4081;I)V
      official <init> Lbsc;<init>(Lbsd;I)V
    • StatusEffect

      protected StatusEffect(StatusEffectCategory category, int color, ParticleEffect particleEffect)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/effect/StatusEffect;<init>(Lnet/minecraft/entity/effect/StatusEffectCategory;ILnet/minecraft/particle/ParticleEffect;)V
      intermediary <init> Lnet/minecraft/class_1291;<init>(Lnet/minecraft/class_4081;ILnet/minecraft/class_2394;)V
      official <init> Lbsc;<init>(Lbsd;ILlg;)V
  • Method Details

    • getFadeTicks

      public int getFadeTicks()
      Mappings:
      Namespace Name Mixin selector
      named getFadeTicks Lnet/minecraft/entity/effect/StatusEffect;getFadeTicks()I
      intermediary method_55652 Lnet/minecraft/class_1291;method_55652()I
      official b Lbsc;b()I
    • applyUpdateEffect

      public boolean applyUpdateEffect(LivingEntity entity, int amplifier)
      Mappings:
      Namespace Name Mixin selector
      named applyUpdateEffect Lnet/minecraft/entity/effect/StatusEffect;applyUpdateEffect(Lnet/minecraft/entity/LivingEntity;I)Z
      intermediary method_5572 Lnet/minecraft/class_1291;method_5572(Lnet/minecraft/class_1309;I)Z
      official a Lbsc;a(Lbtr;I)Z
    • applyInstantEffect

      public void applyInstantEffect(@Nullable @Nullable Entity source, @Nullable @Nullable Entity attacker, LivingEntity target, int amplifier, double proximity)
      Mappings:
      Namespace Name Mixin selector
      named applyInstantEffect Lnet/minecraft/entity/effect/StatusEffect;applyInstantEffect(Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/LivingEntity;ID)V
      intermediary method_5564 Lnet/minecraft/class_1291;method_5564(Lnet/minecraft/class_1297;Lnet/minecraft/class_1297;Lnet/minecraft/class_1309;ID)V
      official a Lbsc;a(Lbsw;Lbsw;Lbtr;ID)V
    • canApplyUpdateEffect

      public boolean canApplyUpdateEffect(int duration, int amplifier)
      Mappings:
      Namespace Name Mixin selector
      named canApplyUpdateEffect Lnet/minecraft/entity/effect/StatusEffect;canApplyUpdateEffect(II)Z
      intermediary method_5552 Lnet/minecraft/class_1291;method_5552(II)Z
      official a Lbsc;a(II)Z
    • onApplied

      public void onApplied(LivingEntity entity, int amplifier)
      Mappings:
      Namespace Name Mixin selector
      named onApplied Lnet/minecraft/entity/effect/StatusEffect;onApplied(Lnet/minecraft/entity/LivingEntity;I)V
      intermediary method_52520 Lnet/minecraft/class_1291;method_52520(Lnet/minecraft/class_1309;I)V
      official b Lbsc;b(Lbtr;I)V
    • playApplySound

      public void playApplySound(LivingEntity entity, int amplifier)
      Mappings:
      Namespace Name Mixin selector
      named playApplySound Lnet/minecraft/entity/effect/StatusEffect;playApplySound(Lnet/minecraft/entity/LivingEntity;I)V
      intermediary method_58620 Lnet/minecraft/class_1291;method_58620(Lnet/minecraft/class_1309;I)V
      official c Lbsc;c(Lbtr;I)V
    • onEntityRemoval

      public void onEntityRemoval(LivingEntity entity, int amplifier, Entity.RemovalReason reason)
      Mappings:
      Namespace Name Mixin selector
      named onEntityRemoval Lnet/minecraft/entity/effect/StatusEffect;onEntityRemoval(Lnet/minecraft/entity/LivingEntity;ILnet/minecraft/entity/Entity$RemovalReason;)V
      intermediary method_58617 Lnet/minecraft/class_1291;method_58617(Lnet/minecraft/class_1309;ILnet/minecraft/class_1297$class_5529;)V
      official a Lbsc;a(Lbtr;ILbsw$c;)V
    • onEntityDamage

      public void onEntityDamage(LivingEntity entity, int amplifier, DamageSource source, float amount)
      Mappings:
      Namespace Name Mixin selector
      named onEntityDamage Lnet/minecraft/entity/effect/StatusEffect;onEntityDamage(Lnet/minecraft/entity/LivingEntity;ILnet/minecraft/entity/damage/DamageSource;F)V
      intermediary method_58614 Lnet/minecraft/class_1291;method_58614(Lnet/minecraft/class_1309;ILnet/minecraft/class_1282;F)V
      official a Lbsc;a(Lbtr;ILbrp;F)V
    • isInstant

      public boolean isInstant()
      Mappings:
      Namespace Name Mixin selector
      named isInstant Lnet/minecraft/entity/effect/StatusEffect;isInstant()Z
      intermediary method_5561 Lnet/minecraft/class_1291;method_5561()Z
      official a Lbsc;a()Z
    • loadTranslationKey

      protected String loadTranslationKey()
      Mappings:
      Namespace Name Mixin selector
      named loadTranslationKey Lnet/minecraft/entity/effect/StatusEffect;loadTranslationKey()Ljava/lang/String;
      intermediary method_5559 Lnet/minecraft/class_1291;method_5559()Ljava/lang/String;
      official c Lbsc;c()Ljava/lang/String;
    • getTranslationKey

      public String getTranslationKey()
      Mappings:
      Namespace Name Mixin selector
      named getTranslationKey Lnet/minecraft/entity/effect/StatusEffect;getTranslationKey()Ljava/lang/String;
      intermediary method_5567 Lnet/minecraft/class_1291;method_5567()Ljava/lang/String;
      official d Lbsc;d()Ljava/lang/String;
    • getName

      public Text getName()
      Mappings:
      Namespace Name Mixin selector
      named getName Lnet/minecraft/entity/effect/StatusEffect;getName()Lnet/minecraft/text/Text;
      intermediary method_5560 Lnet/minecraft/class_1291;method_5560()Lnet/minecraft/class_2561;
      official e Lbsc;e()Lxp;
    • getCategory

      public StatusEffectCategory getCategory()
      Mappings:
      Namespace Name Mixin selector
      named getCategory Lnet/minecraft/entity/effect/StatusEffect;getCategory()Lnet/minecraft/entity/effect/StatusEffectCategory;
      intermediary method_18792 Lnet/minecraft/class_1291;method_18792()Lnet/minecraft/class_4081;
      official f Lbsc;f()Lbsd;
    • getColor

      public int getColor()
      Mappings:
      Namespace Name Mixin selector
      named getColor Lnet/minecraft/entity/effect/StatusEffect;getColor()I
      intermediary method_5556 Lnet/minecraft/class_1291;method_5556()I
      official g Lbsc;g()I
    • addAttributeModifier

      public StatusEffect addAttributeModifier(RegistryEntry<EntityAttribute> attribute, String uuid, double amount, EntityAttributeModifier.Operation operation)
      Mappings:
      Namespace Name Mixin selector
      named addAttributeModifier Lnet/minecraft/entity/effect/StatusEffect;addAttributeModifier(Lnet/minecraft/registry/entry/RegistryEntry;Ljava/lang/String;DLnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;)Lnet/minecraft/entity/effect/StatusEffect;
      intermediary method_5566 Lnet/minecraft/class_1291;method_5566(Lnet/minecraft/class_6880;Ljava/lang/String;DLnet/minecraft/class_1322$class_1323;)Lnet/minecraft/class_1291;
      official a Lbsc;a(Lji;Ljava/lang/String;DLbux$a;)Lbsc;
    • fadeTicks

      public StatusEffect fadeTicks(int fadeTicks)
      Sets the duration of effect fade-in and fade-out.
      Returns:
      this effect, for chaining
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named fadeTicks Lnet/minecraft/entity/effect/StatusEffect;fadeTicks(I)Lnet/minecraft/entity/effect/StatusEffect;
      intermediary method_55649 Lnet/minecraft/class_1291;method_55649(I)Lnet/minecraft/class_1291;
      official a Lbsc;a(I)Lbsc;
    • forEachAttributeModifier

      public void forEachAttributeModifier(int amplifier, BiConsumer<RegistryEntry<EntityAttribute>,EntityAttributeModifier> consumer)
      Mappings:
      Namespace Name Mixin selector
      named forEachAttributeModifier Lnet/minecraft/entity/effect/StatusEffect;forEachAttributeModifier(ILjava/util/function/BiConsumer;)V
      intermediary method_55650 Lnet/minecraft/class_1291;method_55650(ILjava/util/function/BiConsumer;)V
      official a Lbsc;a(ILjava/util/function/BiConsumer;)V
    • onRemoved

      public void onRemoved(AttributeContainer attributeContainer)
      Mappings:
      Namespace Name Mixin selector
      named onRemoved Lnet/minecraft/entity/effect/StatusEffect;onRemoved(Lnet/minecraft/entity/attribute/AttributeContainer;)V
      intermediary method_5562 Lnet/minecraft/class_1291;method_5562(Lnet/minecraft/class_5131;)V
      official a Lbsc;a(Lbuw;)V
    • onApplied

      public void onApplied(AttributeContainer attributeContainer, int amplifier)
      Mappings:
      Namespace Name Mixin selector
      named onApplied Lnet/minecraft/entity/effect/StatusEffect;onApplied(Lnet/minecraft/entity/attribute/AttributeContainer;I)V
      intermediary method_5555 Lnet/minecraft/class_1291;method_5555(Lnet/minecraft/class_5131;I)V
      official a Lbsc;a(Lbuw;I)V
    • isBeneficial

      public boolean isBeneficial()
      Mappings:
      Namespace Name Mixin selector
      named isBeneficial Lnet/minecraft/entity/effect/StatusEffect;isBeneficial()Z
      intermediary method_5573 Lnet/minecraft/class_1291;method_5573()Z
      official h Lbsc;h()Z
    • createParticle

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

      public StatusEffect applySound(SoundEvent sound)
      Mappings:
      Namespace Name Mixin selector
      named applySound Lnet/minecraft/entity/effect/StatusEffect;applySound(Lnet/minecraft/sound/SoundEvent;)Lnet/minecraft/entity/effect/StatusEffect;
      intermediary method_58616 Lnet/minecraft/class_1291;method_58616(Lnet/minecraft/class_3414;)Lnet/minecraft/class_1291;
      official a Lbsc;a(Lavz;)Lbsc;
    • requires

      public StatusEffect requires(FeatureFlag[] requiredFeatures)
      Mappings:
      Namespace Name Mixin selector
      named requires Lnet/minecraft/entity/effect/StatusEffect;requires([Lnet/minecraft/resource/featuretoggle/FeatureFlag;)Lnet/minecraft/entity/effect/StatusEffect;
      intermediary method_58619 Lnet/minecraft/class_1291;method_58619([Lnet/minecraft/class_7696;)Lnet/minecraft/class_1291;
      official a Lbsc;a([Lcpl;)Lbsc;
    • getRequiredFeatures

      public FeatureSet getRequiredFeatures()
      Specified by:
      getRequiredFeatures in interface ToggleableFeature
      Mappings:
      Namespace Name Mixin selector
      named getRequiredFeatures Lnet/minecraft/resource/featuretoggle/ToggleableFeature;getRequiredFeatures()Lnet/minecraft/resource/featuretoggle/FeatureSet;
      intermediary method_45322 Lnet/minecraft/class_7695;method_45322()Lnet/minecraft/class_7699;
      official i Lcpk;i()Lcpn;