Package net.minecraft.command.argument
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$ComponentCheckintermediary net/minecraft/class_2293$class_9444official hf$anamed idintermediary comp_2527official anamed presenceCheckerintermediary comp_2528official bnamed valueCheckerintermediary comp_2529official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IdentifierThe field for theidrecord component.The field for thepresenceCheckerrecord component.The field for thevalueCheckerrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionComponentCheck(Identifier identifier, Predicate<ItemStack> predicate, com.mojang.serialization.Decoder<? extends Predicate<ItemStack>> decoder) -
Method Summary
Modifier and TypeMethodDescriptioncreatePredicate(com.mojang.brigadier.ImmutableStringReader reader, RegistryOps<NbtElement> ops, NbtElement nbt) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of thepresenceCheckerrecord component.static <T> ItemPredicateArgumentType.ComponentCheckread(com.mojang.brigadier.ImmutableStringReader reader, Identifier id, ComponentType<T> type) final StringtoString()Returns a string representation of this record class.Returns the value of thevalueCheckerrecord component.
-
Field Details
-
id
The field for theidrecord component. -
presenceChecker
The field for thepresenceCheckerrecord component. -
valueChecker
The field for thevalueCheckerrecord component.
-
-
Constructor Details
-
ComponentCheck
ComponentCheck(Identifier identifier, Predicate<ItemStack> predicate, com.mojang.serialization.Decoder<? extends Predicate<ItemStack>> decoder)
-
-
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 readLnet/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_58536Lnet/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 aLhf$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 createPredicateLnet/minecraft/command/argument/ItemPredicateArgumentType$ComponentCheck;createPredicate(Lcom/mojang/brigadier/ImmutableStringReader;Lnet/minecraft/registry/RegistryOps;Lnet/minecraft/nbt/NbtElement;)Ljava/util/function/Predicate;intermediary method_58535Lnet/minecraft/class_2293$class_9444;method_58535(Lcom/mojang/brigadier/ImmutableStringReader;Lnet/minecraft/class_6903;Lnet/minecraft/class_2520;)Ljava/util/function/Predicate;official aLhf$a;a(Lcom/mojang/brigadier/ImmutableStringReader;Lakp;Luy;)Ljava/util/function/Predicate;
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
presenceChecker
Returns the value of thepresenceCheckerrecord component.- Returns:
- the value of the
presenceCheckerrecord component
-
valueChecker
Returns the value of thevalueCheckerrecord component.- Returns:
- the value of the
valueCheckerrecord component
-