Package net.minecraft.server.commands
Class LocateCommand
java.lang.Object
net.minecraft.server.commands.LocateCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final org.slf4j.Logger
private static final int
private static final int
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static float
dist
(int x1, int z1, int x2, int z2) private static Optional
<? extends HolderSet.ListBacked<Structure>> getHolders
(ResourceOrTagKeyArgument.Result<Structure> structure, Registry<Structure> structureRegistry) private static int
locateBiome
(CommandSourceStack source, ResourceOrTagArgument.Result<Biome> biome) private static int
locatePoi
(CommandSourceStack source, ResourceOrTagArgument.Result<PoiType> poiType) private static int
locateStructure
(CommandSourceStack source, ResourceOrTagKeyArgument.Result<Structure> structure) static void
register
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) static int
showLocateResult
(CommandSourceStack source, ResourceOrTagArgument.Result<?> result, BlockPos sourcePosition, com.mojang.datafixers.util.Pair<BlockPos, ? extends Holder<?>> resultWithPosition, String translationKey, boolean absoluteY, Duration duration) static int
showLocateResult
(CommandSourceStack source, ResourceOrTagKeyArgument.Result<?> result, BlockPos sourcePosition, com.mojang.datafixers.util.Pair<BlockPos, ? extends Holder<?>> resultWithPosition, String translationKey, boolean absoluteY, Duration duration) private static int
showLocateResult
(CommandSourceStack source, BlockPos sourcePosition, com.mojang.datafixers.util.Pair<BlockPos, ? extends Holder<?>> resultWithoutPosition, String translationKey, boolean absoluteY, String elementName, Duration duration)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
ERROR_STRUCTURE_NOT_FOUND
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_STRUCTURE_NOT_FOUND -
ERROR_STRUCTURE_INVALID
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_STRUCTURE_INVALID -
ERROR_BIOME_NOT_FOUND
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_BIOME_NOT_FOUND -
ERROR_POI_NOT_FOUND
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_POI_NOT_FOUND -
MAX_STRUCTURE_SEARCH_RADIUS
private static final int MAX_STRUCTURE_SEARCH_RADIUS- See Also:
-
MAX_BIOME_SEARCH_RADIUS
private static final int MAX_BIOME_SEARCH_RADIUS- See Also:
-
BIOME_SAMPLE_RESOLUTION_HORIZONTAL
private static final int BIOME_SAMPLE_RESOLUTION_HORIZONTAL- See Also:
-
BIOME_SAMPLE_RESOLUTION_VERTICAL
private static final int BIOME_SAMPLE_RESOLUTION_VERTICAL- See Also:
-
POI_SEARCH_RADIUS
private static final int POI_SEARCH_RADIUS- See Also:
-
-
Constructor Details
-
LocateCommand
public LocateCommand()
-
-
Method Details
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) -
getHolders
private static Optional<? extends HolderSet.ListBacked<Structure>> getHolders(ResourceOrTagKeyArgument.Result<Structure> structure, Registry<Structure> structureRegistry) -
locateStructure
private static int locateStructure(CommandSourceStack source, ResourceOrTagKeyArgument.Result<Structure> structure) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
locateBiome
private static int locateBiome(CommandSourceStack source, ResourceOrTagArgument.Result<Biome> biome) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
locatePoi
private static int locatePoi(CommandSourceStack source, ResourceOrTagArgument.Result<PoiType> poiType) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
showLocateResult
public static int showLocateResult(CommandSourceStack source, ResourceOrTagArgument.Result<?> result, BlockPos sourcePosition, com.mojang.datafixers.util.Pair<BlockPos, ? extends Holder<?>> resultWithPosition, String translationKey, boolean absoluteY, Duration duration) -
showLocateResult
public static int showLocateResult(CommandSourceStack source, ResourceOrTagKeyArgument.Result<?> result, BlockPos sourcePosition, com.mojang.datafixers.util.Pair<BlockPos, ? extends Holder<?>> resultWithPosition, String translationKey, boolean absoluteY, Duration duration) -
showLocateResult
-
dist
private static float dist(int x1, int z1, int x2, int z2)
-