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 Details

    • key

      private final String key
      The field for the key record component.
    • valueMatcher

      private final StatePredicate.ValueMatcher valueMatcher
      The field for the valueMatcher record component.
    • PACKET_CODEC

      public static final PacketCodec<ByteBuf,StatePredicate.Condition> 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 a Condition record class.
      Parameters:
      key - the value for the key record component
      valueMatcher - the value for the valueMatcher record component
  • Method Details

    • test

      public <S extends State<?, S>> boolean test(StateManager<?,S> stateManager, S state)
      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

      public Optional<String> reportMissing(StateManager<?,?> factory)
      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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • key

      public String key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • valueMatcher

      public StatePredicate.ValueMatcher valueMatcher()
      Returns the value of the valueMatcher record component.
      Returns:
      the value of the valueMatcher record component