Record Class PlayerPredicate.AdvancementCriteriaPredicate

java.lang.Object
java.lang.Record
net.minecraft.predicate.entity.PlayerPredicate.AdvancementCriteriaPredicate
Record Components:
criteria -
All Implemented Interfaces:
Predicate<AdvancementProgress>, PlayerPredicate.AdvancementPredicate
Enclosing class:
PlayerPredicate

private static record PlayerPredicate.AdvancementCriteriaPredicate(Object2BooleanMap<String> criteria) extends Record implements PlayerPredicate.AdvancementPredicate
Mappings:
Namespace Name
official cr$a
intermediary net/minecraft/class_4553$class_4554
named net/minecraft/predicate/entity/PlayerPredicate$AdvancementCriteriaPredicate
official c
intermediary comp_1823
named criteria
  • Field Details

    • criteria

      private final Object2BooleanMap<String> criteria
      The field for the criteria record component.
    • CODEC

      public static final com.mojang.serialization.Codec<PlayerPredicate.AdvancementCriteriaPredicate> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Lcr$a;a:Lcom/mojang/serialization/Codec;
      intermediary field_45771 Lnet/minecraft/class_4553$class_4554;field_45771:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/predicate/entity/PlayerPredicate$AdvancementCriteriaPredicate;CODEC:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • AdvancementCriteriaPredicate

      AdvancementCriteriaPredicate(Object2BooleanMap<String> criteria)
      Creates an instance of a AdvancementCriteriaPredicate record class.
      Parameters:
      criteria - the value for the criteria record component
  • Method Details

    • test

      public boolean test(AdvancementProgress advancementProgress)
      Specified by:
      test in interface Predicate<AdvancementProgress>
      Mappings:
      Namespace Name Mixin selector
      official a Lcr$a;a(Lah;)Z
      intermediary method_22504 Lnet/minecraft/class_4553$class_4554;method_22504(Lnet/minecraft/class_167;)Z
      named test Lnet/minecraft/predicate/entity/PlayerPredicate$AdvancementCriteriaPredicate;test(Lnet/minecraft/advancement/AdvancementProgress;)Z
    • 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.
    • criteria

      public Object2BooleanMap<String> criteria()
      Returns the value of the criteria record component.
      Returns:
      the value of the criteria record component