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 buo
-
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
(ServerWorld world, LivingEntity entity, DamageSource source, float amount) void
onEntityRemoval
(ServerWorld world, 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
Lbuo;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
Lbuo;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
Lbuo;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
Lbuo;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
Lbuo;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
Lbuo;e:Lzt;
-
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
Lbuo;g:Ljq;
-
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
Lbuo;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
Lbuo;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
Lbuo;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
Lbuo;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
Lbuo;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
Lbuo;n:Lbuo$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>
Lbuo;<init>(Ljq;)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>
Lbuo;<init>(Ljq;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>
Lbuo;<init>(Ljq;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>
Lbuo;<init>(Ljq;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>
Lbuo;<init>(Ljq;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>
Lbuo;<init>(Ljq;IIZZZLbuo;)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>
Lbuo;<init>(Lbuo;)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>
Lbuo;<init>(Ljq;Lbuo$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
Lbuo;l()Lbuo$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
Lbuo;a(Lbwf;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
Lbuo;a()Llq;
-
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
Lbuo;a(Lbuo;)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
Lbuo;b(Lbuo;)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
Lbuo;e(Lbuo;)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
Lbuo;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
Lbuo;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
Lbuo;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
Lbuo;c()Ljq;
-
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
Lbuo;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
Lbuo;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
Lbuo;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
Lbuo;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
Lbuo;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
Lbuo;a(Lbwf;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
Lbuo;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
Lbuo;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
Lbuo;a(Lbwf;)V
-
onEntityRemoval
- Mappings:
Namespace Name Mixin selector named onEntityRemoval
Lnet/minecraft/entity/effect/StatusEffectInstance;onEntityRemoval(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity$RemovalReason;)V
intermediary method_58622
Lnet/minecraft/class_1293;method_58622(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;Lnet/minecraft/class_1297$class_5529;)V
official a
Lbuo;a(Lash;Lbwf;Lbvj$d;)V
-
onEntityDamage
public void onEntityDamage(ServerWorld world, LivingEntity entity, DamageSource source, float amount) - Mappings:
Namespace Name Mixin selector named onEntityDamage
Lnet/minecraft/entity/effect/StatusEffectInstance;onEntityDamage(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/damage/DamageSource;F)V
intermediary method_58621
Lnet/minecraft/class_1293;method_58621(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;Lnet/minecraft/class_1282;F)V
official a
Lbuo;a(Lash;Lbwf;Lbtz;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
Lbuo;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
Lbuo;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
Lbuo;j()Lvu;
-
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
Lbuo;a(Lux;)Lbuo;
-
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
Lbuo;c(Lbuo;)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
Lbuo;b(Lbwf;)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
Lbuo;a(Ljq;)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
Lbuo;d(Lbuo;)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
Lbuo;k()V
-