Class ItemPredicateArgument
java.lang.Object
net.minecraft.commands.arguments.item.ItemPredicateArgument
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<ItemPredicateArgument.Result>
public class ItemPredicateArgument
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<ItemPredicateArgument.Result>
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Collection<String>
private final HolderLookup<Item>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static ItemPredicateArgument.Result
createResult
(Predicate<Holder<Item>> p_235366_, CompoundTag p_235367_) getItemPredicate
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_121041_, String p_121042_) static ItemPredicateArgument
itemPredicate
(CommandBuildContext p_235354_) <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
listSuggestions
(com.mojang.brigadier.context.CommandContext<S> p_121054_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_121055_) parse
(com.mojang.brigadier.StringReader p_121039_)
-
Field Details
-
EXAMPLES
-
items
-
-
Constructor Details
-
ItemPredicateArgument
-
-
Method Details
-
itemPredicate
-
parse
public ItemPredicateArgument.Result parse(com.mojang.brigadier.StringReader p_121039_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
parse
in interfacecom.mojang.brigadier.arguments.ArgumentType<ItemPredicateArgument.Result>
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getItemPredicate
public static Predicate<ItemStack> getItemPredicate(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_121041_, String p_121042_) -
listSuggestions
public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_121054_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_121055_) - Specified by:
listSuggestions
in interfacecom.mojang.brigadier.arguments.ArgumentType<ItemPredicateArgument.Result>
-
getExamples
- Specified by:
getExamples
in interfacecom.mojang.brigadier.arguments.ArgumentType<ItemPredicateArgument.Result>
-
createResult
private static ItemPredicateArgument.Result createResult(Predicate<Holder<Item>> p_235366_, @Nullable CompoundTag p_235367_)
-