Record Class AdvancementRequirements

java.lang.Object
java.lang.Record
net.minecraft.advancement.AdvancementRequirements
Record Components:
requirements -

public record AdvancementRequirements(List<List<String>> requirements) extends Record
Mappings:
Namespace Name
official ai
intermediary net/minecraft/class_8782
named net/minecraft/advancement/AdvancementRequirements
official c
intermediary comp_1922
named requirements
  • Field Details

    • requirements

      private final List<List<String>> requirements
      The field for the requirements record component.
    • CODEC

      public static final com.mojang.serialization.Codec<AdvancementRequirements> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Lai;a:Lcom/mojang/serialization/Codec;
      intermediary field_47184 Lnet/minecraft/class_8782;field_47184:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/advancement/AdvancementRequirements;CODEC:Lcom/mojang/serialization/Codec;
    • EMPTY

      public static final AdvancementRequirements EMPTY
      Mappings:
      Namespace Name Mixin selector
      official b Lai;b:Lai;
      intermediary field_46084 Lnet/minecraft/class_8782;field_46084:Lnet/minecraft/class_8782;
      named EMPTY Lnet/minecraft/advancement/AdvancementRequirements;EMPTY:Lnet/minecraft/advancement/AdvancementRequirements;
  • Constructor Details

    • AdvancementRequirements

      public AdvancementRequirements(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lai;<init>(Lui;)V
      intermediary <init> Lnet/minecraft/class_8782;<init>(Lnet/minecraft/class_2540;)V
      named <init> Lnet/minecraft/advancement/AdvancementRequirements;<init>(Lnet/minecraft/network/PacketByteBuf;)V
    • AdvancementRequirements

      public AdvancementRequirements(List<List<String>> list)
  • Method Details

    • writeRequirements

      public void writeRequirements(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      official a Lai;a(Lui;)V
      intermediary method_53670 Lnet/minecraft/class_8782;method_53670(Lnet/minecraft/class_2540;)V
      named writeRequirements Lnet/minecraft/advancement/AdvancementRequirements;writeRequirements(Lnet/minecraft/network/PacketByteBuf;)V
    • allOf

      public static AdvancementRequirements allOf(Collection<String> requirements)
      Mappings:
      Namespace Name Mixin selector
      official a Lai;a(Ljava/util/Collection;)Lai;
      intermediary method_53668 Lnet/minecraft/class_8782;method_53668(Ljava/util/Collection;)Lnet/minecraft/class_8782;
      named allOf Lnet/minecraft/advancement/AdvancementRequirements;allOf(Ljava/util/Collection;)Lnet/minecraft/advancement/AdvancementRequirements;
    • anyOf

      public static AdvancementRequirements anyOf(Collection<String> requirements)
      Mappings:
      Namespace Name Mixin selector
      official b Lai;b(Ljava/util/Collection;)Lai;
      intermediary method_53674 Lnet/minecraft/class_8782;method_53674(Ljava/util/Collection;)Lnet/minecraft/class_8782;
      named anyOf Lnet/minecraft/advancement/AdvancementRequirements;anyOf(Ljava/util/Collection;)Lnet/minecraft/advancement/AdvancementRequirements;
    • getLength

      public int getLength()
      Mappings:
      Namespace Name Mixin selector
      official a Lai;a()I
      intermediary method_53664 Lnet/minecraft/class_8782;method_53664()I
      named getLength Lnet/minecraft/advancement/AdvancementRequirements;getLength()I
    • matches

      public boolean matches(Predicate<String> predicate)
      Mappings:
      Namespace Name Mixin selector
      official a Lai;a(Ljava/util/function/Predicate;)Z
      intermediary method_53669 Lnet/minecraft/class_8782;method_53669(Ljava/util/function/Predicate;)Z
      named matches Lnet/minecraft/advancement/AdvancementRequirements;matches(Ljava/util/function/Predicate;)Z
    • countMatches

      public int countMatches(Predicate<String> predicate)
      Mappings:
      Namespace Name Mixin selector
      official b Lai;b(Ljava/util/function/Predicate;)I
      intermediary method_53675 Lnet/minecraft/class_8782;method_53675(Ljava/util/function/Predicate;)I
      named countMatches Lnet/minecraft/advancement/AdvancementRequirements;countMatches(Ljava/util/function/Predicate;)I
    • anyMatch

      private static boolean anyMatch(List<String> requirements, Predicate<String> predicate)
      Mappings:
      Namespace Name Mixin selector
      official a Lai;a(Ljava/util/List;Ljava/util/function/Predicate;)Z
      intermediary method_53671 Lnet/minecraft/class_8782;method_53671(Ljava/util/List;Ljava/util/function/Predicate;)Z
      named anyMatch Lnet/minecraft/advancement/AdvancementRequirements;anyMatch(Ljava/util/List;Ljava/util/function/Predicate;)Z
    • validate

      public com.mojang.serialization.DataResult<AdvancementRequirements> validate(Set<String> requirements)
      Mappings:
      Namespace Name Mixin selector
      official a Lai;a(Ljava/util/Set;)Lcom/mojang/serialization/DataResult;
      intermediary method_54925 Lnet/minecraft/class_8782;method_54925(Ljava/util/Set;)Lcom/mojang/serialization/DataResult;
      named validate Lnet/minecraft/advancement/AdvancementRequirements;validate(Ljava/util/Set;)Lcom/mojang/serialization/DataResult;
    • isEmpty

      public boolean isEmpty()
      Mappings:
      Namespace Name Mixin selector
      official b Lai;b()Z
      intermediary method_53677 Lnet/minecraft/class_8782;method_53677()Z
      named isEmpty Lnet/minecraft/advancement/AdvancementRequirements;isEmpty()Z
    • toString

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

      public Set<String> getNames()
      Mappings:
      Namespace Name Mixin selector
      official c Lai;c()Ljava/util/Set;
      intermediary method_53678 Lnet/minecraft/class_8782;method_53678()Ljava/util/Set;
      named getNames Lnet/minecraft/advancement/AdvancementRequirements;getNames()Ljava/util/Set;
    • 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.
    • requirements

      public List<List<String>> requirements()
      Returns the value of the requirements record component.
      Returns:
      the value of the requirements record component