Package net.minecraft.entity.effect
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
- Mappings:
Namespace Name named net/minecraft/entity/effect/StatusEffect
intermediary net/minecraft/class_1291
official brx
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static final record
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
private Optional
<SoundEvent> private final Map
<RegistryEntry<EntityAttribute>, StatusEffect.EffectAttributeModifierCreator> private final StatusEffectCategory
private final int
static final com.mojang.serialization.Codec
<RegistryEntry<StatusEffect>> static final PacketCodec
<RegistryByteBuf, RegistryEntry<StatusEffect>> private int
private final Function
<StatusEffectInstance, ParticleEffect> private FeatureSet
Fields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS
-
Constructor Summary
ModifierConstructorDescriptionprotected
StatusEffect
(StatusEffectCategory category, int color) protected
StatusEffect
(StatusEffectCategory category, int color, ParticleEffect particleEffect) -
Method Summary
Modifier and TypeMethodDescriptionaddAttributeModifier
(RegistryEntry<EntityAttribute> attribute, Identifier id, double amount, EntityAttributeModifier.Operation operation) void
applyInstantEffect
(@Nullable Entity source, @Nullable Entity attacker, LivingEntity target, int amplifier, double proximity) applySound
(SoundEvent sound) boolean
applyUpdateEffect
(LivingEntity entity, int amplifier) boolean
canApplyUpdateEffect
(int duration, int amplifier) createParticle
(StatusEffectInstance effect) fadeTicks
(int fadeTicks) Sets the duration of effect fade-in and fade-out.void
forEachAttributeModifier
(int amplifier, BiConsumer<RegistryEntry<EntityAttribute>, EntityAttributeModifier> consumer) int
getColor()
int
getName()
boolean
boolean
protected String
void
onApplied
(AttributeContainer attributeContainer, int amplifier) void
onApplied
(LivingEntity entity, int amplifier) void
onEntityDamage
(LivingEntity entity, int amplifier, DamageSource source, float amount) void
onEntityRemoval
(LivingEntity entity, int amplifier, Entity.RemovalReason reason) void
onRemoved
(AttributeContainer attributeContainer) void
playApplySound
(LivingEntity entity, int amplifier) requires
(FeatureFlag[] requiredFeatures) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
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
Lbrx;a:Lcom/mojang/serialization/Codec;
-
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
Lbrx;b:Lyx;
-
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
Lbrx;c:I
-
attributeModifiers
private final Map<RegistryEntry<EntityAttribute>,StatusEffect.EffectAttributeModifierCreator> 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
Lbrx;d:Ljava/util/Map;
-
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
Lbrx;e:Lbry;
-
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
Lbrx;f:I
-
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
Lbrx;g:Ljava/util/function/Function;
-
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
Lbrx;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
Lbrx;i:I
-
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
Lbrx;j:Ljava/util/Optional;
-
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
Lbrx;k:Lcpl;
-
-
Constructor Details
-
StatusEffect
- 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>
Lbrx;<init>(Lbry;I)V
-
StatusEffect
- 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>
Lbrx;<init>(Lbry;ILlk;)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
Lbrx;b()I
-
applyUpdateEffect
- 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
Lbrx;a(Lbtn;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
Lbrx;a(Lbsr;Lbsr;Lbtn;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
Lbrx;a(II)Z
-
onApplied
- 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
Lbrx;b(Lbtn;I)V
-
playApplySound
- 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
Lbrx;c(Lbtn;I)V
-
onEntityRemoval
- 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
Lbrx;a(Lbtn;ILbsr$c;)V
-
onEntityDamage
- 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
Lbrx;a(Lbtn;ILbrk;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
Lbrx;a()Z
-
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
Lbrx;c()Ljava/lang/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
Lbrx;d()Ljava/lang/String;
-
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
Lbrx;e()Lwz;
-
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
Lbrx;f()Lbry;
-
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
Lbrx;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
Lbrx;a(Ljm;Lakr;DLbuu$a;)Lbrx;
-
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
Lbrx;a(I)Lbrx;
-
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
Lbrx;a(ILjava/util/function/BiConsumer;)V
-
onRemoved
- 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
Lbrx;a(Lbut;)V
-
onApplied
- 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
Lbrx;a(Lbut;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
Lbrx;h()Z
-
createParticle
- 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
Lbrx;a(Lbrz;)Llk;
-
applySound
- 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
Lbrx;a(Lavo;)Lbrx;
-
requires
- 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
Lbrx;a([Lcpj;)Lbrx;
-
getRequiredFeatures
- Specified by:
getRequiredFeatures
in interfaceToggleableFeature
- 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
Lcpi;i()Lcpl;
-