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 Details

  • 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
      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

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

      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