Class ItemPredicateArgument.Context
java.lang.Object
net.minecraft.commands.arguments.item.ItemPredicateArgument.Context
- All Implemented Interfaces:
ComponentPredicateParser.Context<Predicate<ItemStack>,
ItemPredicateArgument.ComponentWrapper, ItemPredicateArgument.PredicateWrapper>
- Enclosing class:
ItemPredicateArgument
static class ItemPredicateArgument.Context
extends Object
implements ComponentPredicateParser.Context<Predicate<ItemStack>,ItemPredicateArgument.ComponentWrapper,ItemPredicateArgument.PredicateWrapper>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final HolderLookup.RegistryLookup
<DataComponentType<?>> private final HolderLookup.RegistryLookup
<Item> private final HolderLookup.RegistryLookup
<ItemSubPredicate.Type<?>> private final RegistryOps
<Tag> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateComponentTest
(com.mojang.brigadier.ImmutableStringReader p_335602_, ItemPredicateArgument.ComponentWrapper p_335607_) createComponentTest
(com.mojang.brigadier.ImmutableStringReader p_335953_, ItemPredicateArgument.ComponentWrapper p_335824_, Tag p_335973_) createPredicateTest
(com.mojang.brigadier.ImmutableStringReader p_335414_, ItemPredicateArgument.PredicateWrapper p_335561_, Tag p_336073_) forElementType
(com.mojang.brigadier.ImmutableStringReader p_335407_, ResourceLocation p_335837_) forTagType
(com.mojang.brigadier.ImmutableStringReader p_335801_, ResourceLocation p_336117_) lookupComponentType
(com.mojang.brigadier.ImmutableStringReader p_336180_, ResourceLocation p_335872_) lookupPredicateType
(com.mojang.brigadier.ImmutableStringReader p_335514_, ResourceLocation p_335709_)
-
Field Details
-
items
-
components
-
predicates
-
registryOps
-
-
Constructor Details
-
Context
Context(HolderLookup.Provider p_335856_)
-
-
Method Details
-
forElementType
public Predicate<ItemStack> forElementType(com.mojang.brigadier.ImmutableStringReader p_335407_, ResourceLocation p_335837_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
forElementType
in interfaceComponentPredicateParser.Context<Predicate<ItemStack>,
ItemPredicateArgument.ComponentWrapper, ItemPredicateArgument.PredicateWrapper> - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
forTagType
public Predicate<ItemStack> forTagType(com.mojang.brigadier.ImmutableStringReader p_335801_, ResourceLocation p_336117_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
forTagType
in interfaceComponentPredicateParser.Context<Predicate<ItemStack>,
ItemPredicateArgument.ComponentWrapper, ItemPredicateArgument.PredicateWrapper> - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
lookupComponentType
public ItemPredicateArgument.ComponentWrapper lookupComponentType(com.mojang.brigadier.ImmutableStringReader p_336180_, ResourceLocation p_335872_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
lookupComponentType
in interfaceComponentPredicateParser.Context<Predicate<ItemStack>,
ItemPredicateArgument.ComponentWrapper, ItemPredicateArgument.PredicateWrapper> - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
createComponentTest
public Predicate<ItemStack> createComponentTest(com.mojang.brigadier.ImmutableStringReader p_335953_, ItemPredicateArgument.ComponentWrapper p_335824_, Tag p_335973_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
createComponentTest
in interfaceComponentPredicateParser.Context<Predicate<ItemStack>,
ItemPredicateArgument.ComponentWrapper, ItemPredicateArgument.PredicateWrapper> - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
createComponentTest
public Predicate<ItemStack> createComponentTest(com.mojang.brigadier.ImmutableStringReader p_335602_, ItemPredicateArgument.ComponentWrapper p_335607_) -
lookupPredicateType
public ItemPredicateArgument.PredicateWrapper lookupPredicateType(com.mojang.brigadier.ImmutableStringReader p_335514_, ResourceLocation p_335709_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
lookupPredicateType
in interfaceComponentPredicateParser.Context<Predicate<ItemStack>,
ItemPredicateArgument.ComponentWrapper, ItemPredicateArgument.PredicateWrapper> - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
createPredicateTest
public Predicate<ItemStack> createPredicateTest(com.mojang.brigadier.ImmutableStringReader p_335414_, ItemPredicateArgument.PredicateWrapper p_335561_, Tag p_336073_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
createPredicateTest
in interfaceComponentPredicateParser.Context<Predicate<ItemStack>,
ItemPredicateArgument.ComponentWrapper, ItemPredicateArgument.PredicateWrapper> - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
listElementTypes
-
listTagTypes
-
listComponentTypes
-
listPredicateTypes
-
negate
- Specified by:
negate
in interfaceComponentPredicateParser.Context<Predicate<ItemStack>,
ItemPredicateArgument.ComponentWrapper, ItemPredicateArgument.PredicateWrapper>
-
anyOf
- Specified by:
anyOf
in interfaceComponentPredicateParser.Context<Predicate<ItemStack>,
ItemPredicateArgument.ComponentWrapper, ItemPredicateArgument.PredicateWrapper>
-