Class ItemParser

java.lang.Object
net.minecraft.commands.arguments.item.ItemParser

public class ItemParser extends Object
  • Field Details

    • ERROR_NO_TAGS_ALLOWED

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NO_TAGS_ALLOWED
    • ERROR_UNKNOWN_ITEM

      public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_UNKNOWN_ITEM
    • SYNTAX_START_NBT

      private static final char SYNTAX_START_NBT
      See Also:
      Constant Field Values
    • SYNTAX_TAG

      private static final char SYNTAX_TAG
      See Also:
      Constant Field Values
    • SUGGEST_NOTHING

      private static final BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,​TagCollection<Item>,​CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> SUGGEST_NOTHING
    • reader

      private final com.mojang.brigadier.StringReader reader
    • forTesting

      private final boolean forTesting
    • item

      private Item item
    • nbt

      @Nullable private CompoundTag nbt
    • tag

      private ResourceLocation tag
    • tagCursor

      private int tagCursor
    • suggestions

      private BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,​TagCollection<Item>,​CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> suggestions
  • Constructor Details

    • ItemParser

      public ItemParser(com.mojang.brigadier.StringReader p_121004_, boolean p_121005_)
  • Method Details

    • getItem

      public Item getItem()
    • getNbt

      @Nullable public CompoundTag getNbt()
    • getTag

      public ResourceLocation getTag()
    • readItem

      public void readItem() throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • readTag

      public void readTag() throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • readNbt

      public void readNbt() throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • parse

      public ItemParser 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_121016_, TagCollection<Item> p_121017_)
    • suggestTag

      private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTag(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121020_, TagCollection<Item> p_121021_)
    • suggestItemIdOrTag

      private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestItemIdOrTag(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121024_, TagCollection<Item> p_121025_)
    • fillSuggestions

      public CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> fillSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121010_, TagCollection<Item> p_121011_)