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 theeffectsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRemoveStatusEffectsConsumeEffect(Holder<MobEffect> p_366636_) Creates an instance of aRemoveStatusEffectsConsumeEffectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanapply(Level p_366881_, ItemStack p_366460_, LivingEntity p_366649_) effects()Returns the value of theeffectsrecord component.final booleanIndicates whether some other object is "equal to" this one.getType()final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
effects
The field for theeffectsrecord component. -
CODEC
-
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf,RemoveStatusEffectsConsumeEffect> STREAM_CODEC
-
-
Constructor Details
-
RemoveStatusEffectsConsumeEffect
-
RemoveStatusEffectsConsumeEffect
Creates an instance of aRemoveStatusEffectsConsumeEffectrecord class.- Parameters:
effects- the value for theeffectsrecord component
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceConsumeEffect
-
apply
- Specified by:
applyin 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 theeffectsrecord component.- Returns:
- the value of the
effectsrecord component
-