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/InputPredicate
intermediary net/minecraft/class_10184
official ch
named forward
intermediary comp_3152
official b
named backward
intermediary comp_3153
official c
named left
intermediary comp_3154
official d
named right
intermediary comp_3155
official e
named jump
intermediary comp_3156
official f
named sneak
intermediary comp_3157
official g
named sprint
intermediary comp_3158
official h
-
Field Summary
Modifier and TypeFieldDescriptionThe field for thebackward
record component.static final com.mojang.serialization.Codec
<InputPredicate> The field for theforward
record component.The field for thejump
record component.The field for theleft
record component.The field for theright
record component.The field for thesneak
record component.The field for thesprint
record component. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbackward()
Returns the value of thebackward
record component.final boolean
Indicates whether some other object is "equal to" this one.forward()
Returns the value of theforward
record component.final int
hashCode()
Returns a hash code value for this object.jump()
Returns the value of thejump
record component.private boolean
keyMatches
(Optional<Boolean> keyPressed, boolean inputPressed) left()
Returns the value of theleft
record component.boolean
matches
(PlayerInput playerInput) right()
Returns the value of theright
record component.sneak()
Returns the value of thesneak
record component.sprint()
Returns the value of thesprint
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
forward
The field for theforward
record component. -
backward
The field for thebackward
record component. -
left
The field for theleft
record component. -
right
The field for theright
record component. -
jump
The field for thejump
record component. -
sneak
The field for thesneak
record component. -
sprint
The field for thesprint
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/predicate/entity/InputPredicate;CODEC:Lcom/mojang/serialization/Codec;
intermediary field_54096
Lnet/minecraft/class_10184;field_54096:Lcom/mojang/serialization/Codec;
official a
Lch;a:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
InputPredicate
-
-
Method Details
-
matches
- Mappings:
Namespace Name Mixin selector named matches
Lnet/minecraft/predicate/entity/InputPredicate;matches(Lnet/minecraft/util/PlayerInput;)Z
intermediary method_63643
Lnet/minecraft/class_10184;method_63643(Lnet/minecraft/class_10185;)Z
official a
Lch;a(Lcpu;)Z
-
keyMatches
- Mappings:
Namespace Name Mixin selector named keyMatches
Lnet/minecraft/predicate/entity/InputPredicate;keyMatches(Ljava/util/Optional;Z)Z
intermediary method_63645
Lnet/minecraft/class_10184;method_63645(Ljava/util/Optional;Z)Z
official a
Lch;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 theforward
record component.- Returns:
- the value of the
forward
record component
-
backward
Returns the value of thebackward
record component.- Returns:
- the value of the
backward
record component
-
left
Returns the value of theleft
record component.- Returns:
- the value of the
left
record component
-
right
Returns the value of theright
record component.- Returns:
- the value of the
right
record component
-
jump
Returns the value of thejump
record component.- Returns:
- the value of the
jump
record component
-
sneak
Returns the value of thesneak
record component.- Returns:
- the value of the
sneak
record component
-
sprint
Returns the value of thesprint
record component.- Returns:
- the value of the
sprint
record component
-