Package net.minecraft.predicate.entity
Record Class InputPredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.entity.InputPredicate
- Record Components:
forward-backward-left-right-jump-sneak-sprint-
public record InputPredicate(Optional<Boolean> forward, Optional<Boolean> backward, Optional<Boolean> left, Optional<Boolean> right, Optional<Boolean> jump, Optional<Boolean> sneak, Optional<Boolean> sprint)
extends Record
- Mappings:
Namespace Name named net/minecraft/predicate/entity/InputPredicateintermediary net/minecraft/class_10184official cknamed forwardintermediary comp_3152official bnamed backwardintermediary comp_3153official cnamed leftintermediary comp_3154official dnamed rightintermediary comp_3155official enamed jumpintermediary comp_3156official fnamed sneakintermediary comp_3157official gnamed sprintintermediary comp_3158official h
-
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.private booleankeyMatches(Optional<Boolean> keyPressed, boolean inputPressed) left()Returns the value of theleftrecord component.booleanmatches(PlayerInput playerInput) right()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
The field for theforwardrecord component. -
backward
The field for thebackwardrecord component. -
left
The field for theleftrecord component. -
right
The field for therightrecord component. -
jump
The field for thejumprecord component. -
sneak
The field for thesneakrecord component. -
sprint
The field for thesprintrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/predicate/entity/InputPredicate;CODEC:Lcom/mojang/serialization/Codec;intermediary field_54096Lnet/minecraft/class_10184;field_54096:Lcom/mojang/serialization/Codec;official aLck;a:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
InputPredicate
-
-
Method Details
-
matches
- Mappings:
Namespace Name Mixin selector named matchesLnet/minecraft/predicate/entity/InputPredicate;matches(Lnet/minecraft/util/PlayerInput;)Zintermediary method_63643Lnet/minecraft/class_10184;method_63643(Lnet/minecraft/class_10185;)Zofficial aLck;a(Lcsg;)Z
-
keyMatches
- Mappings:
Namespace Name Mixin selector named keyMatchesLnet/minecraft/predicate/entity/InputPredicate;keyMatches(Ljava/util/Optional;Z)Zintermediary method_63645Lnet/minecraft/class_10184;method_63645(Ljava/util/Optional;Z)Zofficial aLck;a(Ljava/util/Optional;Z)Z
-
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). -
forward
Returns the value of theforwardrecord component.- Returns:
- the value of the
forwardrecord component
-
backward
Returns the value of thebackwardrecord component.- Returns:
- the value of the
backwardrecord component
-
left
Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-
right
Returns the value of therightrecord component.- Returns:
- the value of the
rightrecord component
-
jump
Returns the value of thejumprecord component.- Returns:
- the value of the
jumprecord component
-
sneak
Returns the value of thesneakrecord component.- Returns:
- the value of the
sneakrecord component
-
sprint
Returns the value of thesprintrecord component.- Returns:
- the value of the
sprintrecord component
-