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 bsb
-
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
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, String uuid, 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
-
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
Lbsb;a: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 b
Lbsb;b: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 c
Lbsb;c:Lbsc;
-
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
Lbsb;d: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 e
Lbsb;e: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 f
Lbsb;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
Lbsb;g: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 h
Lbsb;h: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 i
Lbsb;i:Lcpm;
-
-
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>
Lbsb;<init>(Lbsc;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>
Lbsb;<init>(Lbsc;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
Lbsb;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
Lbsb;a(Lbtq;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
Lbsb;a(Lbsv;Lbsv;Lbtq;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
Lbsb;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
Lbsb;b(Lbtq;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
Lbsb;c(Lbtq;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
Lbsb;a(Lbtq;ILbsv$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
Lbsb;a(Lbtq;ILbro;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
Lbsb;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
Lbsb;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
Lbsb;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
Lbsb;e()Lxp;
-
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
Lbsb;f()Lbsc;
-
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
Lbsb;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
Lbsb;a(Lji;Ljava/lang/String;DLbuw$a;)Lbsb;
-
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
Lbsb;a(I)Lbsb;
-
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
Lbsb;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
Lbsb;a(Lbuv;)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
Lbsb;a(Lbuv;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
Lbsb;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
Lbsb;a(Lbsd;)Llg;
-
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
Lbsb;a(Lavz;)Lbsb;
-
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
Lbsb;a([Lcpk;)Lbsb;
-
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
Lcpj;i()Lcpm;
-