Class ItemParser
java.lang.Object
net.minecraft.commands.arguments.item.ItemParser
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static final record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private final HolderLookup<Item>
private CompoundTag
private final com.mojang.brigadier.StringReader
private static final Function<com.mojang.brigadier.suggestion.SuggestionsBuilder,
CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> private Function<com.mojang.brigadier.suggestion.SuggestionsBuilder,
CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> private static final char
private static final char
-
Constructor Summary
ModifierConstructorDescriptionprivate
ItemParser
(HolderLookup<Item> p_235291_, com.mojang.brigadier.StringReader p_235292_, boolean p_235293_) -
Method Summary
Modifier and TypeMethodDescriptionstatic CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
fillSuggestions
(HolderLookup<Item> p_235309_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_235310_, boolean p_235311_) private void
parse()
static ItemParser.ItemResult
parseForItem
(HolderLookup<Item> p_235306_, com.mojang.brigadier.StringReader p_235307_) static com.mojang.datafixers.util.Either<ItemParser.ItemResult,
ItemParser.TagResult> parseForTesting
(HolderLookup<Item> p_235320_, com.mojang.brigadier.StringReader p_235321_) private void
readItem()
private void
readNbt()
private void
readTag()
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestItem
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_235323_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestItemIdOrTag
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_235326_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestOpenNbt
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_235298_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestTag
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_235318_)
-
Field Details
-
ERROR_NO_TAGS_ALLOWED
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NO_TAGS_ALLOWED -
ERROR_UNKNOWN_ITEM
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_UNKNOWN_ITEM -
ERROR_UNKNOWN_TAG
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_UNKNOWN_TAG -
SYNTAX_START_NBT
private static final char SYNTAX_START_NBT- See Also:
-
SYNTAX_TAG
private static final char SYNTAX_TAG- See Also:
-
SUGGEST_NOTHING
private static final Function<com.mojang.brigadier.suggestion.SuggestionsBuilder,CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> SUGGEST_NOTHING -
items
-
reader
private final com.mojang.brigadier.StringReader reader -
allowTags
private final boolean allowTags -
result
-
nbt
-
suggestions
private Function<com.mojang.brigadier.suggestion.SuggestionsBuilder,CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> suggestions
-
-
Constructor Details
-
ItemParser
private ItemParser(HolderLookup<Item> p_235291_, com.mojang.brigadier.StringReader p_235292_, boolean p_235293_)
-
-
Method Details
-
parseForItem
public static ItemParser.ItemResult parseForItem(HolderLookup<Item> p_235306_, com.mojang.brigadier.StringReader p_235307_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parseForTesting
public static com.mojang.datafixers.util.Either<ItemParser.ItemResult,ItemParser.TagResult> parseForTesting(HolderLookup<Item> p_235320_, com.mojang.brigadier.StringReader p_235321_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
fillSuggestions
public static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> fillSuggestions(HolderLookup<Item> p_235309_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_235310_, boolean p_235311_) -
readItem
private void readItem() throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readTag
private void readTag() throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readNbt
private void readNbt() throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parse
private void parse() throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
suggestOpenNbt
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOpenNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder p_235298_) -
suggestTag
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTag(com.mojang.brigadier.suggestion.SuggestionsBuilder p_235318_) -
suggestItem
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestItem(com.mojang.brigadier.suggestion.SuggestionsBuilder p_235323_) -
suggestItemIdOrTag
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestItemIdOrTag(com.mojang.brigadier.suggestion.SuggestionsBuilder p_235326_)
-