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 brn
  • Field Details

    • ENTRY_CODEC

      public static final com.mojang.serialization.Codec<RegistryEntry<StatusEffect>> ENTRY_CODEC
      Mappings:
      Namespace Name Mixin selector
      named ENTRY_CODEC Lnet/minecraft/entity/effect/StatusEffect;ENTRY_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_51933 Lnet/minecraft/class_1291;field_51933:Lcom/mojang/serialization/Codec;
      official a Lbrn;a:Lcom/mojang/serialization/Codec;
    • ENTRY_PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,RegistryEntry<StatusEffect>> ENTRY_PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named ENTRY_PACKET_CODEC Lnet/minecraft/entity/effect/StatusEffect;ENTRY_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_51934 Lnet/minecraft/class_1291;field_51934:Lnet/minecraft/class_9139;
      official b Lbrn;b:Lys;
    • 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 c Lbrn;c: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 d Lbrn;d: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 e Lbrn;e:Lbro;
    • 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 f Lbrn;f: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 g Lbrn;g: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 h Lbrn;h: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 i Lbrn;i: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 j Lbrn;j: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 k Lbrn;k:Lcoz;
  • 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> Lbrn;<init>(Lbro;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> Lbrn;<init>(Lbro;ILlh;)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 Lbrn;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 Lbrn;a(Lbtc;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 Lbrn;a(Lbsh;Lbsh;Lbtc;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 Lbrn;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 Lbrn;b(Lbtc;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 Lbrn;c(Lbtc;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 Lbrn;a(Lbtc;ILbsh$d;)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 Lbrn;a(Lbtc;ILbra;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 Lbrn;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 Lbrn;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 Lbrn;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 Lbrn;e()Lwu;
    • 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 Lbrn;f()Lbro;
    • 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 Lbrn;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 Lbrn;a(Ljj;Ljava/lang/String;DLbui$a;)Lbrn;
    • 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 Lbrn;a(I)Lbrn;
    • 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 Lbrn;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 Lbrn;a(Lbuh;)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 Lbrn;a(Lbuh;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 Lbrn;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 Lbrn;a(Lbrp;)Llh;
    • 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 Lbrn;a(Lavg;)Lbrn;
    • 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 Lbrn;a([Lcox;)Lbrn;
    • 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 Lcow;i()Lcoz;