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_330923_, ItemPredicateArgument.ComponentWrapper p_336299_) createComponentTest
(com.mojang.brigadier.ImmutableStringReader p_330237_, ItemPredicateArgument.ComponentWrapper p_334559_, Tag p_328343_) createPredicateTest
(com.mojang.brigadier.ImmutableStringReader p_332241_, ItemPredicateArgument.PredicateWrapper p_335982_, Tag p_333667_) forElementType
(com.mojang.brigadier.ImmutableStringReader p_328916_, ResourceLocation p_333737_) forTagType
(com.mojang.brigadier.ImmutableStringReader p_332402_, ResourceLocation p_328228_) lookupComponentType
(com.mojang.brigadier.ImmutableStringReader p_329300_, ResourceLocation p_330392_) lookupPredicateType
(com.mojang.brigadier.ImmutableStringReader p_330457_, ResourceLocation p_335636_)
-
Field Details
-
items
-
components
-
predicates
-
registryOps
-
-
Constructor Details
-
Context
Context(HolderLookup.Provider p_331757_)
-
-
Method Details
-
forElementType
public Predicate<ItemStack> forElementType(com.mojang.brigadier.ImmutableStringReader p_328916_, ResourceLocation p_333737_) 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_332402_, ResourceLocation p_328228_) 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_329300_, ResourceLocation p_330392_) 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_330237_, ItemPredicateArgument.ComponentWrapper p_334559_, Tag p_328343_) 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_330923_, ItemPredicateArgument.ComponentWrapper p_336299_) -
lookupPredicateType
public ItemPredicateArgument.PredicateWrapper lookupPredicateType(com.mojang.brigadier.ImmutableStringReader p_330457_, ResourceLocation p_335636_) 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_332241_, ItemPredicateArgument.PredicateWrapper p_335982_, Tag p_333667_) 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>
-