Record Class SlimePredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.SlimePredicate
- All Implemented Interfaces:
EntitySubPredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<SlimePredicate> private final MinMaxBounds.IntsThe field for thesizerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aSlimePredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<SlimePredicate> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmatches(Entity p_223423_, ServerLevel p_223424_, Vec3 p_223425_) size()Returns the value of thesizerecord component.static SlimePredicatesized(MinMaxBounds.Ints p_223427_) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
size
The field for thesizerecord component. -
CODEC
-
-
Constructor Details
-
SlimePredicate
Creates an instance of aSlimePredicaterecord class.- Parameters:
size- the value for thesizerecord component
-
-
Method Details
-
sized
-
matches
- Specified by:
matchesin interfaceEntitySubPredicate
-
codec
- Specified by:
codecin interfaceEntitySubPredicate
-
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). -
size
Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-