Record Class SteppingOnPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.predicates.entity.SteppingOnPredicate
- All Implemented Interfaces:
EntitySubPredicate
public record SteppingOnPredicate(LocationPredicate predicate)
extends Record
implements EntitySubPredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SteppingOnPredicate> private final LocationPredicateThe field for thepredicaterecord component.Fields inherited from interface EntitySubPredicate
ALWAYS_TRUE -
Constructor Summary
ConstructorsConstructorDescriptionSteppingOnPredicate(LocationPredicate predicate) Creates an instance of aSteppingOnPredicaterecord 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.booleanmatches(Entity entity, ServerLevel level, @Nullable Vec3 position) Returns the value of thepredicaterecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface EntitySubPredicate
and
-
Field Details
-
predicate
The field for thepredicaterecord component. -
CODEC
-
-
Constructor Details
-
SteppingOnPredicate
Creates an instance of aSteppingOnPredicaterecord class.- Parameters:
predicate- the value for thepredicaterecord component
-
-
Method Details
-
matches
- Specified by:
matchesin interfaceEntitySubPredicate
-
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). -
predicate
Returns the value of thepredicaterecord component.- Returns:
- the value of the
predicaterecord component
-