Package net.minecraft.entity.effect
Class StatusEffectInstance
java.lang.Object
net.minecraft.entity.effect.StatusEffectInstance
- All Implemented Interfaces:
Comparable<StatusEffectInstance>
- Mappings:
Namespace Name named net/minecraft/entity/effect/StatusEffectInstance
intermediary net/minecraft/class_1293
official brz
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
Computes the factor (multiplier) for effect fade-in and fade-out.private static final record
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private int
static final com.mojang.serialization.Codec
<StatusEffectInstance> private int
private final StatusEffectInstance.Fading
private @Nullable StatusEffectInstance
The effect hidden when upgrading effects.static final int
private static final Logger
static final int
static final int
static final PacketCodec
<RegistryByteBuf, StatusEffectInstance> private boolean
private boolean
private final RegistryEntry
<StatusEffect> -
Constructor Summary
ModifierConstructorDescriptionStatusEffectInstance
(StatusEffectInstance instance) StatusEffectInstance
(RegistryEntry<StatusEffect> effect, int duration) StatusEffectInstance
(RegistryEntry<StatusEffect> effect, int duration, int amplifier) StatusEffectInstance
(RegistryEntry<StatusEffect> effect, int duration, int amplifier, boolean ambient, boolean visible) StatusEffectInstance
(RegistryEntry<StatusEffect> effect, int duration, int amplifier, boolean ambient, boolean showParticles, boolean showIcon) StatusEffectInstance
(RegistryEntry<StatusEffect> effect, int duration, int amplifier, boolean ambient, boolean showParticles, boolean showIcon, @Nullable StatusEffectInstance hiddenEffect) private
StatusEffectInstance
(RegistryEntry<StatusEffect> effect, StatusEffectInstance.Parameters parameters) -
Method Summary
Modifier and TypeMethodDescriptionprivate StatusEffectInstance.Parameters
int
compareTo
(StatusEffectInstance statusEffectInstance) void
copyFadingFrom
(StatusEffectInstance effect) (package private) void
copyFrom
(StatusEffectInstance that) boolean
boolean
equals
(RegistryEntry<StatusEffect> effect) static @Nullable StatusEffectInstance
fromNbt
(NbtCompound nbt) int
int
private String
float
getFadeFactor
(LivingEntity entity, float tickDelta) Returns the factor (multiplier) for effect fade-in and fade-out.int
hashCode()
private boolean
isActive()
boolean
boolean
isDurationBelow
(int duration) boolean
private boolean
lastsShorterThan
(StatusEffectInstance effect) int
mapDuration
(Int2IntFunction mapper) void
onApplied
(LivingEntity entity) void
onEntityDamage
(LivingEntity entity, DamageSource source, float amount) void
onEntityRemoval
(LivingEntity entity, Entity.RemovalReason reason) void
playApplySound
(LivingEntity entity) boolean
boolean
void
Skips fade-in or fade-out currently in progress, instantly setting it to the final state (factor1.0f
or0.0f
, depending on the effect's duration).toString()
boolean
update
(LivingEntity entity, Runnable overwriteCallback) private int
boolean
upgrade
(StatusEffectInstance that) writeNbt()
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGER
Lnet/minecraft/entity/effect/StatusEffectInstance;LOGGER:Lorg/slf4j/Logger;
intermediary field_5897
Lnet/minecraft/class_1293;field_5897:Lorg/slf4j/Logger;
official f
Lbrz;f:Lorg/slf4j/Logger;
-
INFINITE
public static final int INFINITE- See Also:
- Mappings:
Namespace Name Mixin selector named INFINITE
Lnet/minecraft/entity/effect/StatusEffectInstance;INFINITE:I
intermediary field_42106
Lnet/minecraft/class_1293;field_42106:I
official a
Lbrz;a:I
-
MIN_AMPLIFIER
public static final int MIN_AMPLIFIER- See Also:
- Mappings:
Namespace Name Mixin selector named MIN_AMPLIFIER
Lnet/minecraft/entity/effect/StatusEffectInstance;MIN_AMPLIFIER:I
intermediary field_49014
Lnet/minecraft/class_1293;field_49014:I
official b
Lbrz;b:I
-
MAX_AMPLIFIER
public static final int MAX_AMPLIFIER- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_AMPLIFIER
Lnet/minecraft/entity/effect/StatusEffectInstance;MAX_AMPLIFIER:I
intermediary field_49015
Lnet/minecraft/class_1293;field_49015:I
official c
Lbrz;c:I
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/entity/effect/StatusEffectInstance;CODEC:Lcom/mojang/serialization/Codec;
intermediary field_48821
Lnet/minecraft/class_1293;field_48821:Lcom/mojang/serialization/Codec;
official d
Lbrz;d:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODEC
Lnet/minecraft/entity/effect/StatusEffectInstance;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
intermediary field_49207
Lnet/minecraft/class_1293;field_49207:Lnet/minecraft/class_9139;
official e
Lbrz;e:Lyx;
-
type
- Mappings:
Namespace Name Mixin selector named type
Lnet/minecraft/entity/effect/StatusEffectInstance;type:Lnet/minecraft/registry/entry/RegistryEntry;
intermediary field_5896
Lnet/minecraft/class_1293;field_5896:Lnet/minecraft/class_6880;
official g
Lbrz;g:Ljm;
-
duration
private int duration- Mappings:
Namespace Name Mixin selector named duration
Lnet/minecraft/entity/effect/StatusEffectInstance;duration:I
intermediary field_5895
Lnet/minecraft/class_1293;field_5895:I
official h
Lbrz;h:I
-
amplifier
private int amplifier- Mappings:
Namespace Name Mixin selector named amplifier
Lnet/minecraft/entity/effect/StatusEffectInstance;amplifier:I
intermediary field_5893
Lnet/minecraft/class_1293;field_5893:I
official i
Lbrz;i:I
-
ambient
private boolean ambient- Mappings:
Namespace Name Mixin selector named ambient
Lnet/minecraft/entity/effect/StatusEffectInstance;ambient:Z
intermediary field_5892
Lnet/minecraft/class_1293;field_5892:Z
official j
Lbrz;j:Z
-
showParticles
private boolean showParticles- Mappings:
Namespace Name Mixin selector named showParticles
Lnet/minecraft/entity/effect/StatusEffectInstance;showParticles:Z
intermediary field_5890
Lnet/minecraft/class_1293;field_5890:Z
official k
Lbrz;k:Z
-
showIcon
private boolean showIcon- Mappings:
Namespace Name Mixin selector named showIcon
Lnet/minecraft/entity/effect/StatusEffectInstance;showIcon:Z
intermediary field_5889
Lnet/minecraft/class_1293;field_5889:Z
official l
Lbrz;l:Z
-
fading
- Mappings:
Namespace Name Mixin selector named fading
Lnet/minecraft/entity/effect/StatusEffectInstance;fading:Lnet/minecraft/entity/effect/StatusEffectInstance$Fading;
intermediary field_47739
Lnet/minecraft/class_1293;field_47739:Lnet/minecraft/class_1293$class_9063;
official n
Lbrz;n:Lbrz$a;
-
-
Constructor Details
-
StatusEffectInstance
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/effect/StatusEffectInstance;<init>(Lnet/minecraft/registry/entry/RegistryEntry;)V
intermediary <init>
Lnet/minecraft/class_1293;<init>(Lnet/minecraft/class_6880;)V
official <init>
Lbrz;<init>(Ljm;)V
-
StatusEffectInstance
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/effect/StatusEffectInstance;<init>(Lnet/minecraft/registry/entry/RegistryEntry;I)V
intermediary <init>
Lnet/minecraft/class_1293;<init>(Lnet/minecraft/class_6880;I)V
official <init>
Lbrz;<init>(Ljm;I)V
-
StatusEffectInstance
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/effect/StatusEffectInstance;<init>(Lnet/minecraft/registry/entry/RegistryEntry;II)V
intermediary <init>
Lnet/minecraft/class_1293;<init>(Lnet/minecraft/class_6880;II)V
official <init>
Lbrz;<init>(Ljm;II)V
-
StatusEffectInstance
public StatusEffectInstance(RegistryEntry<StatusEffect> effect, int duration, int amplifier, boolean ambient, boolean visible) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/effect/StatusEffectInstance;<init>(Lnet/minecraft/registry/entry/RegistryEntry;IIZZ)V
intermediary <init>
Lnet/minecraft/class_1293;<init>(Lnet/minecraft/class_6880;IIZZ)V
official <init>
Lbrz;<init>(Ljm;IIZZ)V
-
StatusEffectInstance
public StatusEffectInstance(RegistryEntry<StatusEffect> effect, int duration, int amplifier, boolean ambient, boolean showParticles, boolean showIcon) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/effect/StatusEffectInstance;<init>(Lnet/minecraft/registry/entry/RegistryEntry;IIZZZ)V
intermediary <init>
Lnet/minecraft/class_1293;<init>(Lnet/minecraft/class_6880;IIZZZ)V
official <init>
Lbrz;<init>(Ljm;IIZZZ)V
-
StatusEffectInstance
public StatusEffectInstance(RegistryEntry<StatusEffect> effect, int duration, int amplifier, boolean ambient, boolean showParticles, boolean showIcon, @Nullable @Nullable StatusEffectInstance hiddenEffect) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/effect/StatusEffectInstance;<init>(Lnet/minecraft/registry/entry/RegistryEntry;IIZZZLnet/minecraft/entity/effect/StatusEffectInstance;)V
intermediary <init>
Lnet/minecraft/class_1293;<init>(Lnet/minecraft/class_6880;IIZZZLnet/minecraft/class_1293;)V
official <init>
Lbrz;<init>(Ljm;IIZZZLbrz;)V
-
StatusEffectInstance
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/effect/StatusEffectInstance;<init>(Lnet/minecraft/entity/effect/StatusEffectInstance;)V
intermediary <init>
Lnet/minecraft/class_1293;<init>(Lnet/minecraft/class_1293;)V
official <init>
Lbrz;<init>(Lbrz;)V
-
StatusEffectInstance
private StatusEffectInstance(RegistryEntry<StatusEffect> effect, StatusEffectInstance.Parameters parameters) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/effect/StatusEffectInstance;<init>(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/entity/effect/StatusEffectInstance$Parameters;)V
intermediary <init>
Lnet/minecraft/class_1293;<init>(Lnet/minecraft/class_6880;Lnet/minecraft/class_1293$class_9195;)V
official <init>
Lbrz;<init>(Ljm;Lbrz$b;)V
-
-
Method Details
-
asParameters
- Mappings:
Namespace Name Mixin selector named asParameters
Lnet/minecraft/entity/effect/StatusEffectInstance;asParameters()Lnet/minecraft/entity/effect/StatusEffectInstance$Parameters;
intermediary method_56668
Lnet/minecraft/class_1293;method_56668()Lnet/minecraft/class_1293$class_9195;
official l
Lbrz;l()Lbrz$b;
-
getFadeFactor
Returns the factor (multiplier) for effect fade-in and fade-out.The return value is between
0.0f
and1.0f
(both inclusive).- Returns:
- the factor (multiplier) for effect fade-in and fade-out
- See Also:
- Mappings:
Namespace Name Mixin selector named getFadeFactor
Lnet/minecraft/entity/effect/StatusEffectInstance;getFadeFactor(Lnet/minecraft/entity/LivingEntity;F)F
intermediary method_55653
Lnet/minecraft/class_1293;method_55653(Lnet/minecraft/class_1309;F)F
official a
Lbrz;a(Lbtn;F)F
-
createParticle
- Mappings:
Namespace Name Mixin selector named createParticle
Lnet/minecraft/entity/effect/StatusEffectInstance;createParticle()Lnet/minecraft/particle/ParticleEffect;
intermediary method_58148
Lnet/minecraft/class_1293;method_58148()Lnet/minecraft/class_2394;
official a
Lbrz;a()Llk;
-
copyFrom
- Mappings:
Namespace Name Mixin selector named copyFrom
Lnet/minecraft/entity/effect/StatusEffectInstance;copyFrom(Lnet/minecraft/entity/effect/StatusEffectInstance;)V
intermediary method_24276
Lnet/minecraft/class_1293;method_24276(Lnet/minecraft/class_1293;)V
official a
Lbrz;a(Lbrz;)V
-
upgrade
- Mappings:
Namespace Name Mixin selector named upgrade
Lnet/minecraft/entity/effect/StatusEffectInstance;upgrade(Lnet/minecraft/entity/effect/StatusEffectInstance;)Z
intermediary method_5590
Lnet/minecraft/class_1293;method_5590(Lnet/minecraft/class_1293;)Z
official b
Lbrz;b(Lbrz;)Z
-
lastsShorterThan
- Mappings:
Namespace Name Mixin selector named lastsShorterThan
Lnet/minecraft/entity/effect/StatusEffectInstance;lastsShorterThan(Lnet/minecraft/entity/effect/StatusEffectInstance;)Z
intermediary method_48561
Lnet/minecraft/class_1293;method_48561(Lnet/minecraft/class_1293;)Z
official e
Lbrz;e(Lbrz;)Z
-
isInfinite
public boolean isInfinite()- Mappings:
Namespace Name Mixin selector named isInfinite
Lnet/minecraft/entity/effect/StatusEffectInstance;isInfinite()Z
intermediary method_48559
Lnet/minecraft/class_1293;method_48559()Z
official b
Lbrz;b()Z
-
isDurationBelow
public boolean isDurationBelow(int duration) - Mappings:
Namespace Name Mixin selector named isDurationBelow
Lnet/minecraft/entity/effect/StatusEffectInstance;isDurationBelow(I)Z
intermediary method_48557
Lnet/minecraft/class_1293;method_48557(I)Z
official a
Lbrz;a(I)Z
-
mapDuration
- Mappings:
Namespace Name Mixin selector named mapDuration
Lnet/minecraft/entity/effect/StatusEffectInstance;mapDuration(Lit/unimi/dsi/fastutil/ints/Int2IntFunction;)I
intermediary method_48558
Lnet/minecraft/class_1293;method_48558(Lit/unimi/dsi/fastutil/ints/Int2IntFunction;)I
official a
Lbrz;a(Lit/unimi/dsi/fastutil/ints/Int2IntFunction;)I
-
getEffectType
- Mappings:
Namespace Name Mixin selector named getEffectType
Lnet/minecraft/entity/effect/StatusEffectInstance;getEffectType()Lnet/minecraft/registry/entry/RegistryEntry;
intermediary method_5579
Lnet/minecraft/class_1293;method_5579()Lnet/minecraft/class_6880;
official c
Lbrz;c()Ljm;
-
getDuration
public int getDuration()- Mappings:
Namespace Name Mixin selector named getDuration
Lnet/minecraft/entity/effect/StatusEffectInstance;getDuration()I
intermediary method_5584
Lnet/minecraft/class_1293;method_5584()I
official d
Lbrz;d()I
-
getAmplifier
public int getAmplifier()- Mappings:
Namespace Name Mixin selector named getAmplifier
Lnet/minecraft/entity/effect/StatusEffectInstance;getAmplifier()I
intermediary method_5578
Lnet/minecraft/class_1293;method_5578()I
official e
Lbrz;e()I
-
isAmbient
public boolean isAmbient()- Mappings:
Namespace Name Mixin selector named isAmbient
Lnet/minecraft/entity/effect/StatusEffectInstance;isAmbient()Z
intermediary method_5591
Lnet/minecraft/class_1293;method_5591()Z
official f
Lbrz;f()Z
-
shouldShowParticles
public boolean shouldShowParticles()- Mappings:
Namespace Name Mixin selector named shouldShowParticles
Lnet/minecraft/entity/effect/StatusEffectInstance;shouldShowParticles()Z
intermediary method_5581
Lnet/minecraft/class_1293;method_5581()Z
official g
Lbrz;g()Z
-
shouldShowIcon
public boolean shouldShowIcon()- Mappings:
Namespace Name Mixin selector named shouldShowIcon
Lnet/minecraft/entity/effect/StatusEffectInstance;shouldShowIcon()Z
intermediary method_5592
Lnet/minecraft/class_1293;method_5592()Z
official h
Lbrz;h()Z
-
update
- Mappings:
Namespace Name Mixin selector named update
Lnet/minecraft/entity/effect/StatusEffectInstance;update(Lnet/minecraft/entity/LivingEntity;Ljava/lang/Runnable;)Z
intermediary method_5585
Lnet/minecraft/class_1293;method_5585(Lnet/minecraft/class_1309;Ljava/lang/Runnable;)Z
official a
Lbrz;a(Lbtn;Ljava/lang/Runnable;)Z
-
isActive
private boolean isActive()- Mappings:
Namespace Name Mixin selector named isActive
Lnet/minecraft/entity/effect/StatusEffectInstance;isActive()Z
intermediary method_48562
Lnet/minecraft/class_1293;method_48562()Z
official m
Lbrz;m()Z
-
updateDuration
private int updateDuration()- Mappings:
Namespace Name Mixin selector named updateDuration
Lnet/minecraft/entity/effect/StatusEffectInstance;updateDuration()I
intermediary method_5588
Lnet/minecraft/class_1293;method_5588()I
official n
Lbrz;n()I
-
onApplied
- Mappings:
Namespace Name Mixin selector named onApplied
Lnet/minecraft/entity/effect/StatusEffectInstance;onApplied(Lnet/minecraft/entity/LivingEntity;)V
intermediary method_52523
Lnet/minecraft/class_1293;method_52523(Lnet/minecraft/class_1309;)V
official a
Lbrz;a(Lbtn;)V
-
onEntityRemoval
- Mappings:
Namespace Name Mixin selector named onEntityRemoval
Lnet/minecraft/entity/effect/StatusEffectInstance;onEntityRemoval(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity$RemovalReason;)V
intermediary method_58622
Lnet/minecraft/class_1293;method_58622(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297$class_5529;)V
official a
Lbrz;a(Lbtn;Lbsr$c;)V
-
onEntityDamage
- Mappings:
Namespace Name Mixin selector named onEntityDamage
Lnet/minecraft/entity/effect/StatusEffectInstance;onEntityDamage(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/damage/DamageSource;F)V
intermediary method_58621
Lnet/minecraft/class_1293;method_58621(Lnet/minecraft/class_1309;Lnet/minecraft/class_1282;F)V
official a
Lbrz;a(Lbtn;Lbrk;F)V
-
getTranslationKey
- Mappings:
Namespace Name Mixin selector named getTranslationKey
Lnet/minecraft/entity/effect/StatusEffectInstance;getTranslationKey()Ljava/lang/String;
intermediary method_5586
Lnet/minecraft/class_1293;method_5586()Ljava/lang/String;
official i
Lbrz;i()Ljava/lang/String;
-
toString
-
getDurationString
- Mappings:
Namespace Name Mixin selector named getDurationString
Lnet/minecraft/entity/effect/StatusEffectInstance;getDurationString()Ljava/lang/String;
intermediary method_48563
Lnet/minecraft/class_1293;method_48563()Ljava/lang/String;
official o
Lbrz;o()Ljava/lang/String;
-
equals
-
hashCode
public int hashCode() -
writeNbt
- Mappings:
Namespace Name Mixin selector named writeNbt
Lnet/minecraft/entity/effect/StatusEffectInstance;writeNbt()Lnet/minecraft/nbt/NbtElement;
intermediary method_5582
Lnet/minecraft/class_1293;method_5582()Lnet/minecraft/class_2520;
official j
Lbrz;j()Luy;
-
fromNbt
- Mappings:
Namespace Name Mixin selector named fromNbt
Lnet/minecraft/entity/effect/StatusEffectInstance;fromNbt(Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/entity/effect/StatusEffectInstance;
intermediary method_5583
Lnet/minecraft/class_1293;method_5583(Lnet/minecraft/class_2487;)Lnet/minecraft/class_1293;
official a
Lbrz;a(Lub;)Lbrz;
-
compareTo
- Specified by:
compareTo
in interfaceComparable<StatusEffectInstance>
- Mappings:
Namespace Name Mixin selector named compareTo
Lnet/minecraft/entity/effect/StatusEffectInstance;compareTo(Lnet/minecraft/entity/effect/StatusEffectInstance;)I
intermediary method_5587
Lnet/minecraft/class_1293;method_5587(Lnet/minecraft/class_1293;)I
official c
Lbrz;c(Lbrz;)I
-
playApplySound
- Mappings:
Namespace Name Mixin selector named playApplySound
Lnet/minecraft/entity/effect/StatusEffectInstance;playApplySound(Lnet/minecraft/entity/LivingEntity;)V
intermediary method_58623
Lnet/minecraft/class_1293;method_58623(Lnet/minecraft/class_1309;)V
official b
Lbrz;b(Lbtn;)V
-
equals
- Mappings:
Namespace Name Mixin selector named equals
Lnet/minecraft/entity/effect/StatusEffectInstance;equals(Lnet/minecraft/registry/entry/RegistryEntry;)Z
intermediary method_55654
Lnet/minecraft/class_1293;method_55654(Lnet/minecraft/class_6880;)Z
official a
Lbrz;a(Ljm;)Z
-
copyFadingFrom
- Mappings:
Namespace Name Mixin selector named copyFadingFrom
Lnet/minecraft/entity/effect/StatusEffectInstance;copyFadingFrom(Lnet/minecraft/entity/effect/StatusEffectInstance;)V
intermediary method_55656
Lnet/minecraft/class_1293;method_55656(Lnet/minecraft/class_1293;)V
official d
Lbrz;d(Lbrz;)V
-
skipFading
public void skipFading()Skips fade-in or fade-out currently in progress, instantly setting it to the final state (factor1.0f
or0.0f
, depending on the effect's duration).- Mappings:
Namespace Name Mixin selector named skipFading
Lnet/minecraft/entity/effect/StatusEffectInstance;skipFading()V
intermediary method_55657
Lnet/minecraft/class_1293;method_55657()V
official k
Lbrz;k()V
-