Record Class ItemPredicateArgumentType.SubPredicateCheck

java.lang.Object
java.lang.Record
net.minecraft.command.argument.ItemPredicateArgumentType.SubPredicateCheck
Record Components:
id -
type -
Enclosing class:
ItemPredicateArgumentType

private static record ItemPredicateArgumentType.SubPredicateCheck(Identifier id, com.mojang.serialization.Decoder<? extends Predicate<ItemStack>> type) extends Record
Mappings:
Namespace Name
named net/minecraft/command/argument/ItemPredicateArgumentType$SubPredicateCheck
intermediary net/minecraft/class_2293$class_9446
official hf$c
named id
intermediary comp_2530
official a
named type
intermediary comp_2531
official b
  • Field Details

    • id

      private final Identifier id
      The field for the id record component.
    • type

      private final com.mojang.serialization.Decoder<? extends Predicate<ItemStack>> type
      The field for the type record component.
  • Constructor Details

    • SubPredicateCheck

      public SubPredicateCheck(RegistryEntry.Reference<ItemSubPredicate.Type<?>> type)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/command/argument/ItemPredicateArgumentType$SubPredicateCheck;<init>(Lnet/minecraft/registry/entry/RegistryEntry$Reference;)V
      intermediary <init> Lnet/minecraft/class_2293$class_9446;<init>(Lnet/minecraft/class_6880$class_6883;)V
      official <init> Lhf$c;<init>(Ljm$c;)V
    • SubPredicateCheck

      SubPredicateCheck(Identifier identifier, com.mojang.serialization.Decoder<? extends Predicate<ItemStack>> decoder)
  • Method Details

    • 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$SubPredicateCheck;createPredicate(Lcom/mojang/brigadier/ImmutableStringReader;Lnet/minecraft/registry/RegistryOps;Lnet/minecraft/nbt/NbtElement;)Ljava/util/function/Predicate;
      intermediary method_58559 Lnet/minecraft/class_2293$class_9446;method_58559(Lcom/mojang/brigadier/ImmutableStringReader;Lnet/minecraft/class_6903;Lnet/minecraft/class_2520;)Ljava/util/function/Predicate;
      official a Lhf$c;a(Lcom/mojang/brigadier/ImmutableStringReader;Lako;Lux;)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
    • type

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