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$ComponentCheck
intermediary net/minecraft/class_2293$class_9444
official hb$a
named id
intermediary comp_2527
official a
named presenceChecker
intermediary comp_2528
official b
named valueChecker
intermediary comp_2529
official c
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Identifier
The field for theid
record component.The field for thepresenceChecker
record component.The field for thevalueChecker
record component. -
Constructor Summary
ConstructorDescriptionComponentCheck
(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 boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.Returns the value of thepresenceChecker
record component.static <T> ItemPredicateArgumentType.ComponentCheck
read
(com.mojang.brigadier.ImmutableStringReader reader, Identifier id, DataComponentType<T> type) final String
toString()
Returns a string representation of this record class.Returns the value of thevalueChecker
record component.
-
Field Details
-
id
The field for theid
record component. -
presenceChecker
The field for thepresenceChecker
record component. -
valueChecker
The field for thevalueChecker
record 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, DataComponentType<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/DataComponentType;)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
Lhb$a;a(Lcom/mojang/brigadier/ImmutableStringReader;Lalf;Lkl;)Lhb$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
Lhb$a;a(Lcom/mojang/brigadier/ImmutableStringReader;Lald;Lvp;)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 theid
record component.- Returns:
- the value of the
id
record component
-
presenceChecker
Returns the value of thepresenceChecker
record component.- Returns:
- the value of the
presenceChecker
record component
-
valueChecker
Returns the value of thevalueChecker
record component.- Returns:
- the value of the
valueChecker
record component
-