Package net.minecraft.command.argument
Class BlockPosArgumentType
java.lang.Object
net.minecraft.command.argument.BlockPosArgumentType
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<PosArgument>
public class BlockPosArgumentType extends Object implements com.mojang.brigadier.arguments.ArgumentType<PosArgument>
-
Field Summary
Fields Modifier and Type Field Description private static Collection<String>
EXAMPLES
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
OUT_OF_WORLD_EXCEPTION
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
UNLOADED_EXCEPTION
-
Constructor Summary
Constructors Constructor Description BlockPosArgumentType()
-
Method Summary
Modifier and Type Method Description static BlockPosArgumentType
blockPos()
static BlockPos
getBlockPos(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)
Collection<String>
getExamples()
static BlockPos
getLoadedBlockPos(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)
<S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
PosArgument
parse(com.mojang.brigadier.StringReader stringReader)
-
Field Details
-
EXAMPLES
-
UNLOADED_EXCEPTION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType UNLOADED_EXCEPTION -
OUT_OF_WORLD_EXCEPTION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType OUT_OF_WORLD_EXCEPTION
-
-
Constructor Details
-
BlockPosArgumentType
public BlockPosArgumentType()
-
-
Method Details
-
blockPos
-
getLoadedBlockPos
public static BlockPos getLoadedBlockPos(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name) -
getBlockPos
public static BlockPos getBlockPos(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name) -
parse
public PosArgument parse(com.mojang.brigadier.StringReader stringReader) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Specified by:
parse
in interfacecom.mojang.brigadier.arguments.ArgumentType<PosArgument>
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
listSuggestions
public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)- Specified by:
listSuggestions
in interfacecom.mojang.brigadier.arguments.ArgumentType<PosArgument>
-
getExamples
- Specified by:
getExamples
in interfacecom.mojang.brigadier.arguments.ArgumentType<PosArgument>
-