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$cintermediary net/minecraft/class_4559$class_4562named net/minecraft/predicate/StatePredicate$Conditionofficial aintermediary comp_1832named keyofficial bintermediary comp_1833named valueMatcher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thekeyrecord component.private final StatePredicate.ValueMatcherThe field for thevalueMatcherrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCondition(String key, StatePredicate.ValueMatcher valueMatcher) Creates an instance of aConditionrecord 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.key()Returns the value of thekeyrecord component.reportMissing(StateManager<?, ?> factory) <S extends State<?,S>>
booleantest(StateManager<?, S> stateManager, S state) final StringtoString()Returns a string representation of this record class.Returns the value of thevalueMatcherrecord component.
-
Field Details
-
key
The field for thekeyrecord component. -
valueMatcher
The field for thevalueMatcherrecord component.
-
-
Constructor Details
-
Condition
Condition(String key, StatePredicate.ValueMatcher valueMatcher) Creates an instance of aConditionrecord class.- Parameters:
key- the value for thekeyrecord componentvalueMatcher- the value for thevalueMatcherrecord component
-
-
Method Details
-
test
- Mappings:
Namespace Name Mixin selector official aLcz$c;a(Ldji;Ldjj;)Zintermediary method_22530Lnet/minecraft/class_4559$class_4562;method_22530(Lnet/minecraft/class_2689;Lnet/minecraft/class_2688;)Znamed testLnet/minecraft/predicate/StatePredicate$Condition;test(Lnet/minecraft/state/StateManager;Lnet/minecraft/state/State;)Z
-
reportMissing
- Mappings:
Namespace Name Mixin selector official aLcz$c;a(Ldji;)Ljava/util/Optional;intermediary method_22531Lnet/minecraft/class_4559$class_4562;method_22531(Lnet/minecraft/class_2689;)Ljava/util/Optional;named reportMissingLnet/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 thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
valueMatcher
Returns the value of thevalueMatcherrecord component.- Returns:
- the value of the
valueMatcherrecord component
-