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 bum
  • 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 Lbum;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 Lbum;b:Lzt;
    • 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 Lbum;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 Lbum;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 Lbum;e:Lbun;
    • 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 Lbum;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 Lbum;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 Lbum;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 Lbum;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 Lbum;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 Lbum;k:Lcss;
  • 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> Lbum;<init>(Lbun;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> Lbum;<init>(Lbun;ILlq;)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 Lbum;b()I
    • applyUpdateEffect

      public boolean applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier)
      Mappings:
      Namespace Name Mixin selector
      named applyUpdateEffect Lnet/minecraft/entity/effect/StatusEffect;applyUpdateEffect(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;I)Z
      intermediary method_5572 Lnet/minecraft/class_1291;method_5572(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;I)Z
      official a Lbum;a(Lash;Lbwf;I)Z
    • applyInstantEffect

      public void applyInstantEffect(ServerWorld world, @Nullable @Nullable Entity effectEntity, @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/server/world/ServerWorld;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_3218;Lnet/minecraft/class_1297;Lnet/minecraft/class_1297;Lnet/minecraft/class_1309;ID)V
      official a Lbum;a(Lash;Lbvj;Lbvj;Lbwf;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 Lbum;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 a Lbum;a(Lbwf;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 b Lbum;b(Lbwf;I)V
    • onEntityRemoval

      public void onEntityRemoval(ServerWorld world, LivingEntity entity, int amplifier, Entity.RemovalReason reason)
      Mappings:
      Namespace Name Mixin selector
      named onEntityRemoval Lnet/minecraft/entity/effect/StatusEffect;onEntityRemoval(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;ILnet/minecraft/entity/Entity$RemovalReason;)V
      intermediary method_58617 Lnet/minecraft/class_1291;method_58617(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;ILnet/minecraft/class_1297$class_5529;)V
      official a Lbum;a(Lash;Lbwf;ILbvj$d;)V
    • onEntityDamage

      public void onEntityDamage(ServerWorld world, LivingEntity entity, int amplifier, DamageSource source, float amount)
      Mappings:
      Namespace Name Mixin selector
      named onEntityDamage Lnet/minecraft/entity/effect/StatusEffect;onEntityDamage(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;ILnet/minecraft/entity/damage/DamageSource;F)V
      intermediary method_58614 Lnet/minecraft/class_1291;method_58614(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;ILnet/minecraft/class_1282;F)V
      official a Lbum;a(Lash;Lbwf;ILbtz;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 Lbum;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 Lbum;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 Lbum;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 Lbum;e()Lxv;
    • 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 Lbum;f()Lbun;
    • 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 Lbum;g()I
    • addAttributeModifier

      public StatusEffect addAttributeModifier(RegistryEntry<EntityAttribute> attribute, Identifier id, double amount, EntityAttributeModifier.Operation operation)
      Mappings:
      Namespace Name Mixin selector
      named addAttributeModifier Lnet/minecraft/entity/effect/StatusEffect;addAttributeModifier(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/util/Identifier;DLnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;)Lnet/minecraft/entity/effect/StatusEffect;
      intermediary method_5566 Lnet/minecraft/class_1291;method_5566(Lnet/minecraft/class_6880;Lnet/minecraft/class_2960;DLnet/minecraft/class_1322$class_1323;)Lnet/minecraft/class_1291;
      official a Lbum;a(Ljq;Lalz;DLbxl$a;)Lbum;
    • 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 Lbum;a(I)Lbum;
    • 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 Lbum;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 Lbum;a(Lbxk;)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 Lbum;a(Lbxk;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 Lbum;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 Lbum;a(Lbuo;)Llq;
    • 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 Lbum;a(Laxe;)Lbum;
    • 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 Lbum;a([Lcsq;)Lbum;
    • 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 Lcsp;i()Lcss;