Package net.minecraft.gametest.framework
Class TestCommand
java.lang.Object
net.minecraft.gametest.framework.TestCommand
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final record
static final record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
private static final int
private static final int
private static final int
private static final int
private static final int
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
private static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
private static final int
static final int
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
static final int
private static final int
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
clear
(TestFinder pTestFinder) private static Optional
<GameTestInfo> createGameTestInfo
(BlockPos pPos, CommandSourceStack pSource, RetryOptions pRetryOptions) private static int
createNewStructure
(CommandSourceStack pSource, ResourceLocation pId, int pWidth, int pHeight, int pDepth) private static BlockPos
private static int
export
(TestFinder pTestFinder) private static int
exportTestStructure
(CommandSourceStack pSource, Holder<GameTestInstance> pTestInstance) private static int
locate
(TestFinder pTestFinder) static void
register
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> p_397608_, CommandBuildContext p_397506_) private static int
reset
(TestFinder pTestFinder) private static int
resetGameTestInfo
(CommandSourceStack pSource, GameTestInfo pTestInfo) private static int
run
(TestFinder pTestFinder, RetryOptions pRetryOptions, int pRotationSteps, int pTestsPerRow) private static com.mojang.brigadier.builder.ArgumentBuilder
<CommandSourceStack, ?> runWithRetryOptions
(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> p_320397_, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> p_397514_) private static com.mojang.brigadier.builder.ArgumentBuilder
<CommandSourceStack, ?> runWithRetryOptions
(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> p_320965_, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> p_397601_, Function<com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?>, com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?>> p_320702_) private static com.mojang.brigadier.builder.ArgumentBuilder
<CommandSourceStack, ?> runWithRetryOptionsAndBuildInfo
(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> p_320872_, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> p_397644_) private static int
showPos
(CommandSourceStack pSource, String pVariableName) private static int
static CompletableFuture
<com.mojang.brigadier.suggestion.Suggestions> suggestTestFunction
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_397651_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_397175_) private static Stream
<GameTestInfo> toGameTestInfo
(CommandSourceStack pSource, RetryOptions pRetryOptions, TestInstanceFinder pFinder, int pRotationSteps) private static Stream
<GameTestInfo> toGameTestInfos
(CommandSourceStack pSource, RetryOptions pRetryOptions, TestPosFinder pPosFinder) static int
trackAndStartRunner
(CommandSourceStack pSource, GameTestRunner pTestRunner) private static int
verify
(TestFinder pTestFinder) private static boolean
verifyStructureExists
(CommandSourceStack pSource, ResourceLocation pStructure)
-
Field Details
-
TEST_NEARBY_SEARCH_RADIUS
public static final int TEST_NEARBY_SEARCH_RADIUS- See Also:
-
TEST_FULL_SEARCH_RADIUS
public static final int TEST_FULL_SEARCH_RADIUS- See Also:
-
VERIFY_TEST_GRID_AXIS_SIZE
public static final int VERIFY_TEST_GRID_AXIS_SIZE- See Also:
-
VERIFY_TEST_BATCH_SIZE
public static final int VERIFY_TEST_BATCH_SIZE- See Also:
-
DEFAULT_CLEAR_RADIUS
private static final int DEFAULT_CLEAR_RADIUS- See Also:
-
MAX_CLEAR_RADIUS
private static final int MAX_CLEAR_RADIUS- See Also:
-
TEST_POS_Z_OFFSET_FROM_PLAYER
private static final int TEST_POS_Z_OFFSET_FROM_PLAYER- See Also:
-
SHOW_POS_DURATION_MS
private static final int SHOW_POS_DURATION_MS- See Also:
-
DEFAULT_X_SIZE
private static final int DEFAULT_X_SIZE- See Also:
-
DEFAULT_Y_SIZE
private static final int DEFAULT_Y_SIZE- See Also:
-
DEFAULT_Z_SIZE
private static final int DEFAULT_Z_SIZE- See Also:
-
CLEAR_NO_TESTS
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType CLEAR_NO_TESTS -
RESET_NO_TESTS
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType RESET_NO_TESTS -
TEST_INSTANCE_COULD_NOT_BE_FOUND
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType TEST_INSTANCE_COULD_NOT_BE_FOUND -
NO_STRUCTURES_TO_EXPORT
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType NO_STRUCTURES_TO_EXPORT -
NO_TEST_INSTANCES
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType NO_TEST_INSTANCES -
NO_TEST_CONTAINING
private static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType NO_TEST_CONTAINING -
TOO_LARGE
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType TOO_LARGE
-
-
Constructor Details
-
TestCommand
public TestCommand()
-
-
Method Details
-
reset
private static int reset(TestFinder pTestFinder) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
clear
private static int clear(TestFinder pTestFinder) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
export
private static int export(TestFinder pTestFinder) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
verify
-
run
private static int run(TestFinder pTestFinder, RetryOptions pRetryOptions, int pRotationSteps, int pTestsPerRow) -
locate
private static int locate(TestFinder pTestFinder) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
runWithRetryOptions
private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,?> runWithRetryOptions(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> p_320965_, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> p_397601_, Function<com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?>, com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?>> p_320702_) -
runWithRetryOptions
private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,?> runWithRetryOptions(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> p_320397_, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> p_397514_) -
runWithRetryOptionsAndBuildInfo
private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,?> runWithRetryOptionsAndBuildInfo(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> p_320872_, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> p_397644_) -
register
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> p_397608_, CommandBuildContext p_397506_) -
suggestTestFunction
public static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTestFunction(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_397651_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_397175_) -
resetGameTestInfo
-
toGameTestInfos
private static Stream<GameTestInfo> toGameTestInfos(CommandSourceStack pSource, RetryOptions pRetryOptions, TestPosFinder pPosFinder) -
toGameTestInfo
private static Stream<GameTestInfo> toGameTestInfo(CommandSourceStack pSource, RetryOptions pRetryOptions, TestInstanceFinder pFinder, int pRotationSteps) -
createGameTestInfo
private static Optional<GameTestInfo> createGameTestInfo(BlockPos pPos, CommandSourceStack pSource, RetryOptions pRetryOptions) -
createNewStructure
private static int createNewStructure(CommandSourceStack pSource, ResourceLocation pId, int pWidth, int pHeight, int pDepth) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
showPos
private static int showPos(CommandSourceStack pSource, String pVariableName) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
stopTests
private static int stopTests() -
trackAndStartRunner
-
exportTestStructure
private static int exportTestStructure(CommandSourceStack pSource, Holder<GameTestInstance> pTestInstance) -
verifyStructureExists
private static boolean verifyStructureExists(CommandSourceStack pSource, ResourceLocation pStructure) -
createTestPositionAround
-