Class LocateCommand
java.lang.Object
net.minecraft.server.commands.LocateCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final DynamicCommandExceptionTypeprivate static final DynamicCommandExceptionTypeprivate static final DynamicCommandExceptionTypeprivate static final DynamicCommandExceptionTypeprivate static final org.slf4j.Loggerprivate static final intprivate static final intprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static floatdist(int x1, int z1, int x2, int z2) private static Optional<? extends HolderSet.ListBacked<Structure>> getHolders(ResourceOrTagKeyArgument.Result<Structure> resourceOrTag, Registry<Structure> registry) private static intlocateBiome(CommandSourceStack source, ResourceOrTagArgument.Result<Biome> elementOrTag) private static intlocatePoi(CommandSourceStack source, ResourceOrTagArgument.Result<PoiType> resourceOrTag) private static intlocateStructure(CommandSourceStack source, ResourceOrTagKeyArgument.Result<Structure> resourceOrTag) static voidregister(CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) static intshowLocateResult(CommandSourceStack source, ResourceOrTagArgument.Result<?> name, BlockPos sourcePos, Pair<BlockPos, ? extends Holder<?>> found, String successMessageKey, boolean includeY, Duration taskDuration) static intshowLocateResult(CommandSourceStack source, ResourceOrTagKeyArgument.Result<?> name, BlockPos sourcePos, Pair<BlockPos, ? extends Holder<?>> found, String successMessageKey, boolean includeY, Duration taskDuration) private static intshowLocateResult(CommandSourceStack source, BlockPos sourcePos, Pair<BlockPos, ? extends Holder<?>> found, String successMessageKey, boolean includeY, String foundName, Duration taskDuration)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
ERROR_STRUCTURE_NOT_FOUND
-
ERROR_STRUCTURE_INVALID
-
ERROR_BIOME_NOT_FOUND
-
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(CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) -
getHolders
private static Optional<? extends HolderSet.ListBacked<Structure>> getHolders(ResourceOrTagKeyArgument.Result<Structure> resourceOrTag, Registry<Structure> registry) -
locateStructure
private static int locateStructure(CommandSourceStack source, ResourceOrTagKeyArgument.Result<Structure> resourceOrTag) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
locateBiome
private static int locateBiome(CommandSourceStack source, ResourceOrTagArgument.Result<Biome> elementOrTag) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
locatePoi
private static int locatePoi(CommandSourceStack source, ResourceOrTagArgument.Result<PoiType> resourceOrTag) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
showLocateResult
public static int showLocateResult(CommandSourceStack source, ResourceOrTagArgument.Result<?> name, BlockPos sourcePos, Pair<BlockPos, ? extends Holder<?>> found, String successMessageKey, boolean includeY, Duration taskDuration) -
showLocateResult
public static int showLocateResult(CommandSourceStack source, ResourceOrTagKeyArgument.Result<?> name, BlockPos sourcePos, Pair<BlockPos, ? extends Holder<?>> found, String successMessageKey, boolean includeY, Duration taskDuration) -
showLocateResult
-
dist
private static float dist(int x1, int z1, int x2, int z2)
-