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$Condition
intermediary net/minecraft/class_4559$class_4562
official eb$c
named key
intermediary comp_1832
official b
named valueMatcher
intermediary comp_1833
official c
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
The field for thekey
record component.static final PacketCodec
<ByteBuf, StatePredicate.Condition> 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. -
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODEC
Lnet/minecraft/predicate/StatePredicate$Condition;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
intermediary field_49398
Lnet/minecraft/class_4559$class_4562;field_49398:Lnet/minecraft/class_9139;
official a
Leb$c;a:Lyw;
-
-
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 named test
Lnet/minecraft/predicate/StatePredicate$Condition;test(Lnet/minecraft/state/StateManager;Lnet/minecraft/state/State;)Z
intermediary method_22530
Lnet/minecraft/class_4559$class_4562;method_22530(Lnet/minecraft/class_2689;Lnet/minecraft/class_2688;)Z
official a
Leb$c;a(Ldtb;Ldtc;)Z
-
reportMissing
- Mappings:
Namespace Name Mixin selector named reportMissing
Lnet/minecraft/predicate/StatePredicate$Condition;reportMissing(Lnet/minecraft/state/StateManager;)Ljava/util/Optional;
intermediary method_22531
Lnet/minecraft/class_4559$class_4562;method_22531(Lnet/minecraft/class_2689;)Ljava/util/Optional;
official a
Leb$c;a(Ldtb;)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
-