Record Class ItemPredicateArgumentType.ComponentCheck

java.lang.Object
java.lang.Record
net.minecraft.command.argument.ItemPredicateArgumentType.ComponentCheck
Record Components:
id -
presenceChecker -
valueChecker -
Enclosing class:
ItemPredicateArgumentType

private static record ItemPredicateArgumentType.ComponentCheck(Identifier id, Predicate<ItemStack> presenceChecker, com.mojang.serialization.Decoder<? extends Predicate<ItemStack>> valueChecker) extends Record
Mappings:
Namespace Name
named net/minecraft/command/argument/ItemPredicateArgumentType$ComponentCheck
intermediary net/minecraft/class_2293$class_9444
official hf$a
named id
intermediary comp_2527
official a
named presenceChecker
intermediary comp_2528
official b
named valueChecker
intermediary comp_2529
official c
  • Field Details

  • Constructor Details

  • Method Details

    • read

      public static <T> ItemPredicateArgumentType.ComponentCheck read(com.mojang.brigadier.ImmutableStringReader reader, Identifier id, ComponentType<T> type) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named read Lnet/minecraft/command/argument/ItemPredicateArgumentType$ComponentCheck;read(Lcom/mojang/brigadier/ImmutableStringReader;Lnet/minecraft/util/Identifier;Lnet/minecraft/component/ComponentType;)Lnet/minecraft/command/argument/ItemPredicateArgumentType$ComponentCheck;
      intermediary method_58536 Lnet/minecraft/class_2293$class_9444;method_58536(Lcom/mojang/brigadier/ImmutableStringReader;Lnet/minecraft/class_2960;Lnet/minecraft/class_9331;)Lnet/minecraft/class_2293$class_9444;
      official a Lhf$a;a(Lcom/mojang/brigadier/ImmutableStringReader;Lakr;Lkp;)Lhf$a;
    • createPredicate

      public Predicate<ItemStack> createPredicate(com.mojang.brigadier.ImmutableStringReader reader, RegistryOps<NbtElement> ops, NbtElement nbt) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named createPredicate Lnet/minecraft/command/argument/ItemPredicateArgumentType$ComponentCheck;createPredicate(Lcom/mojang/brigadier/ImmutableStringReader;Lnet/minecraft/registry/RegistryOps;Lnet/minecraft/nbt/NbtElement;)Ljava/util/function/Predicate;
      intermediary method_58535 Lnet/minecraft/class_2293$class_9444;method_58535(Lcom/mojang/brigadier/ImmutableStringReader;Lnet/minecraft/class_6903;Lnet/minecraft/class_2520;)Ljava/util/function/Predicate;
      official a Lhf$a;a(Lcom/mojang/brigadier/ImmutableStringReader;Lakp;Luy;)Ljava/util/function/Predicate;
    • 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.
    • id

      public Identifier id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • presenceChecker

      public Predicate<ItemStack> presenceChecker()
      Returns the value of the presenceChecker record component.
      Returns:
      the value of the presenceChecker record component
    • valueChecker

      public com.mojang.serialization.Decoder<? extends Predicate<ItemStack>> valueChecker()
      Returns the value of the valueChecker record component.
      Returns:
      the value of the valueChecker record component