Class NbtPathArgumentType

java.lang.Object
net.minecraft.command.argument.NbtPathArgumentType
All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<NbtPathArgumentType.NbtPath>

public class NbtPathArgumentType
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<NbtPathArgumentType.NbtPath>
  • Field Details

    • EXAMPLES

      private static final Collection<String> EXAMPLES
    • INVALID_PATH_NODE_EXCEPTION

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType INVALID_PATH_NODE_EXCEPTION
    • NOTHING_FOUND_EXCEPTION

      public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType NOTHING_FOUND_EXCEPTION
  • Constructor Details

    • NbtPathArgumentType

      public NbtPathArgumentType()
  • Method Details

    • nbtPath

      public static NbtPathArgumentType nbtPath()
    • getNbtPath

      public static NbtPathArgumentType.NbtPath getNbtPath​(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)
    • parse

      public NbtPathArgumentType.NbtPath parse​(com.mojang.brigadier.StringReader stringReader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      parse in interface com.mojang.brigadier.arguments.ArgumentType<NbtPathArgumentType.NbtPath>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • parseNode

      private static NbtPathArgumentType.PathNode parseNode​(com.mojang.brigadier.StringReader reader, boolean root) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • readCompoundChildNode

      private static NbtPathArgumentType.PathNode readCompoundChildNode​(com.mojang.brigadier.StringReader reader, String name) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • readName

      private static String readName​(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getExamples

      public Collection<String> getExamples()
      Specified by:
      getExamples in interface com.mojang.brigadier.arguments.ArgumentType<NbtPathArgumentType.NbtPath>
    • isNameCharacter

      private static boolean isNameCharacter​(char c)
    • getPredicate

      private static Predicate<Tag> getPredicate​(CompoundTag filter)