Record Class FoodPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.criterion.FoodPredicate
public record FoodPredicate(MinMaxBounds.Ints level, MinMaxBounds.Doubles saturation)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FoodPredicatestatic final com.mojang.serialization.Codec<FoodPredicate> private final MinMaxBounds.IntsThe field for thelevelrecord component.private final MinMaxBounds.DoublesThe field for thesaturationrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionFoodPredicate(MinMaxBounds.Ints level, MinMaxBounds.Doubles saturation) Creates an instance of aFoodPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.level()Returns the value of thelevelrecord component.booleanReturns the value of thesaturationrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
level
The field for thelevelrecord component. -
saturation
The field for thesaturationrecord component. -
ANY
-
CODEC
-
-
Constructor Details
-
FoodPredicate
Creates an instance of aFoodPredicaterecord class.- Parameters:
level- the value for thelevelrecord componentsaturation- the value for thesaturationrecord component
-
-
Method Details
-
matches
-
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). -
level
Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
saturation
Returns the value of thesaturationrecord component.- Returns:
- the value of the
saturationrecord component
-