Record Class RemoveBinomial
java.lang.Object
java.lang.Record
net.minecraft.world.item.enchantment.effects.RemoveBinomial
- All Implemented Interfaces:
EnchantmentValueEffect
public record RemoveBinomial(LevelBasedValue chance)
extends Record
implements EnchantmentValueEffect
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LevelBasedValueThe field for thechancerecord component.static final com.mojang.serialization.MapCodec<RemoveBinomial> -
Constructor Summary
ConstructorsConstructorDescriptionRemoveBinomial(LevelBasedValue chance) Creates an instance of aRemoveBinomialrecord class. -
Method Summary
Modifier and TypeMethodDescriptionchance()Returns the value of thechancerecord component.com.mojang.serialization.MapCodec<RemoveBinomial> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatprocess(int p_345007_, RandomSource p_342090_, float p_344829_) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
chance
The field for thechancerecord component. -
CODEC
-
-
Constructor Details
-
RemoveBinomial
Creates an instance of aRemoveBinomialrecord class.- Parameters:
chance- the value for thechancerecord component
-
-
Method Details
-
process
- Specified by:
processin interfaceEnchantmentValueEffect
-
codec
- Specified by:
codecin interfaceEnchantmentValueEffect
-
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). -
chance
Returns the value of thechancerecord component.- Returns:
- the value of the
chancerecord component
-