Package net.minecraft.predicate
Record Class StatePredicate.Condition
java.lang.Object
java.lang.Record
net.minecraft.predicate.StatePredicate.Condition
- Record Components:
key
-valueMatcher
-
- Enclosing class:
StatePredicate
private static record StatePredicate.Condition(String key, StatePredicate.ValueMatcher valueMatcher)
extends Record
- Mappings:
Namespace Name official cz$c
intermediary net/minecraft/class_4559$class_4562
named net/minecraft/predicate/StatePredicate$Condition
official a
intermediary comp_1832
named key
official b
intermediary comp_1833
named valueMatcher
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
The field for thekey
record component.private final StatePredicate.ValueMatcher
The field for thevalueMatcher
record component. -
Constructor Summary
ConstructorDescriptionCondition
(String key, StatePredicate.ValueMatcher valueMatcher) Creates an instance of aCondition
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.key()
Returns the value of thekey
record component.reportMissing
(StateManager<?, ?> factory) <S extends State<?,
S>>
booleantest
(StateManager<?, S> stateManager, S state) final String
toString()
Returns a string representation of this record class.Returns the value of thevalueMatcher
record component.
-
Field Details
-
key
The field for thekey
record component. -
valueMatcher
The field for thevalueMatcher
record component.
-
-
Constructor Details
-
Condition
Condition(String key, StatePredicate.ValueMatcher valueMatcher) Creates an instance of aCondition
record class.- Parameters:
key
- the value for thekey
record componentvalueMatcher
- the value for thevalueMatcher
record component
-
-
Method Details
-
test
- Mappings:
Namespace Name Mixin selector official a
Lcz$c;a(Ldji;Ldjj;)Z
intermediary method_22530
Lnet/minecraft/class_4559$class_4562;method_22530(Lnet/minecraft/class_2689;Lnet/minecraft/class_2688;)Z
named test
Lnet/minecraft/predicate/StatePredicate$Condition;test(Lnet/minecraft/state/StateManager;Lnet/minecraft/state/State;)Z
-
reportMissing
- Mappings:
Namespace Name Mixin selector official a
Lcz$c;a(Ldji;)Ljava/util/Optional;
intermediary method_22531
Lnet/minecraft/class_4559$class_4562;method_22531(Lnet/minecraft/class_2689;)Ljava/util/Optional;
named reportMissing
Lnet/minecraft/predicate/StatePredicate$Condition;reportMissing(Lnet/minecraft/state/StateManager;)Ljava/util/Optional;
-
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)
. -
key
Returns the value of thekey
record component.- Returns:
- the value of the
key
record component
-
valueMatcher
Returns the value of thevalueMatcher
record component.- Returns:
- the value of the
valueMatcher
record component
-