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 named net/minecraft/predicate/StatePredicate$Conditionintermediary net/minecraft/class_4559$class_4562official eb$cnamed keyintermediary comp_1832official bnamed valueMatcherintermediary comp_1833official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thekeyrecord component.static final PacketCodec<ByteBuf, StatePredicate.Condition> 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. -
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/predicate/StatePredicate$Condition;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_49398Lnet/minecraft/class_4559$class_4562;field_49398:Lnet/minecraft/class_9139;official aLeb$c;a:Lyx;
-
-
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 named testLnet/minecraft/predicate/StatePredicate$Condition;test(Lnet/minecraft/state/StateManager;Lnet/minecraft/state/State;)Zintermediary method_22530Lnet/minecraft/class_4559$class_4562;method_22530(Lnet/minecraft/class_2689;Lnet/minecraft/class_2688;)Zofficial aLeb$c;a(Ldtd;Ldte;)Z
-
reportMissing
- Mappings:
Namespace Name Mixin selector named reportMissingLnet/minecraft/predicate/StatePredicate$Condition;reportMissing(Lnet/minecraft/state/StateManager;)Ljava/util/Optional;intermediary method_22531Lnet/minecraft/class_4559$class_4562;method_22531(Lnet/minecraft/class_2689;)Ljava/util/Optional;official aLeb$c;a(Ldtd;)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
-