Record Class InputPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.criterion.InputPredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thebackwardrecord component.static final com.mojang.serialization.Codec<InputPredicate> The field for theforwardrecord component.The field for thejumprecord component.The field for theleftrecord component.The field for therightrecord component.The field for thesneakrecord component.The field for thesprintrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbackward()Returns the value of thebackwardrecord component.final booleanIndicates whether some other object is "equal to" this one.forward()Returns the value of theforwardrecord component.final inthashCode()Returns a hash code value for this object.jump()Returns the value of thejumprecord component.left()Returns the value of theleftrecord component.private booleanbooleanright()Returns the value of therightrecord component.sneak()Returns the value of thesneakrecord component.sprint()Returns the value of thesprintrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
forward
-
backward
-
left
-
right
-
jump
-
sneak
-
sprint
-
CODEC
-
-
Constructor Details
-
InputPredicate
public InputPredicate(Optional<Boolean> forward, Optional<Boolean> backward, Optional<Boolean> left, Optional<Boolean> right, Optional<Boolean> jump, Optional<Boolean> sneak, Optional<Boolean> sprint) Creates an instance of aInputPredicaterecord class.- Parameters:
forward- the value for theforwardrecord componentbackward- the value for thebackwardrecord componentleft- the value for theleftrecord componentright- the value for therightrecord componentjump- the value for thejumprecord componentsneak- the value for thesneakrecord componentsprint- the value for thesprintrecord component
-
-
Method Details
-
matches
-
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). -
forward
-
backward
-
left
-
right
-
jump
-
sneak
-
sprint
-