Record Class SlimePredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.SlimePredicate
- All Implemented Interfaces:
EntitySubPredicate
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<SlimePredicate> private final MinMaxBounds.Ints
The field for thesize
record component. -
Constructor Summary
ConstructorDescriptionCreates an instance of aSlimePredicate
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec
<SlimePredicate> codec()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
matches
(Entity p_223423_, ServerLevel p_223424_, Vec3 p_223425_) size()
Returns the value of thesize
record component.static SlimePredicate
sized
(MinMaxBounds.Ints p_223427_) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
size
The field for thesize
record component. -
CODEC
-
-
Constructor Details
-
SlimePredicate
Creates an instance of aSlimePredicate
record class.- Parameters:
size
- the value for thesize
record component
-
-
Method Details
-
sized
-
matches
- Specified by:
matches
in interfaceEntitySubPredicate
-
codec
- Specified by:
codec
in 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 thesize
record component.- Returns:
- the value of the
size
record component
-