Record Class RemoveStatusEffectsConsumeEffect
java.lang.Object
java.lang.Record
net.minecraft.world.item.consume_effects.RemoveStatusEffectsConsumeEffect
- All Implemented Interfaces:
ConsumeEffect
public record RemoveStatusEffectsConsumeEffect(HolderSet<MobEffect> effects)
extends Record
implements ConsumeEffect
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.item.consume_effects.ConsumeEffect
ConsumeEffect.Type<T extends ConsumeEffect>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<RemoveStatusEffectsConsumeEffect> The field for theeffects
record component. -
Constructor Summary
ConstructorsConstructorDescriptionRemoveStatusEffectsConsumeEffect
(Holder<MobEffect> p_366636_) Creates an instance of aRemoveStatusEffectsConsumeEffect
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
apply
(Level p_366881_, ItemStack p_366460_, LivingEntity p_366649_) effects()
Returns the value of theeffects
record component.final boolean
Indicates whether some other object is "equal to" this one.getType()
final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
effects
The field for theeffects
record component. -
CODEC
-
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf,RemoveStatusEffectsConsumeEffect> STREAM_CODEC
-
-
Constructor Details
-
RemoveStatusEffectsConsumeEffect
-
RemoveStatusEffectsConsumeEffect
Creates an instance of aRemoveStatusEffectsConsumeEffect
record class.- Parameters:
effects
- the value for theeffects
record component
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceConsumeEffect
-
apply
- Specified by:
apply
in interfaceConsumeEffect
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
effects
Returns the value of theeffects
record component.- Returns:
- the value of the
effects
record component
-