Record Class AllOf.ValueEffects
java.lang.Object
java.lang.Record
net.minecraft.world.item.enchantment.effects.AllOf.ValueEffects
- All Implemented Interfaces:
EnchantmentValueEffect
- Enclosing interface:
AllOf
public static record AllOf.ValueEffects(List<EnchantmentValueEffect> effects)
extends Record
implements EnchantmentValueEffect
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<AllOf.ValueEffects> private final List<EnchantmentValueEffect> The field for theeffectsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionValueEffects(List<EnchantmentValueEffect> effects) Creates an instance of aValueEffectsrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<AllOf.ValueEffects> codec()effects()Returns the value of theeffectsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatprocess(int enchantmentLevel, RandomSource random, float value) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
effects
The field for theeffectsrecord component. -
CODEC
-
-
Constructor Details
-
ValueEffects
Creates an instance of aValueEffectsrecord class.- Parameters:
effects- the value for theeffectsrecord component
-
-
Method Details
-
process
- Specified by:
processin interfaceEnchantmentValueEffect
-
codec
- Specified by:
codecin interfaceEnchantmentValueEffect
-
toString
-
hashCode
-
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
-