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 recordstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final intstatic final intprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypestatic final intprivate static final intprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionTypestatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intclear(TestFinder testFinder) private static Optional<GameTestInfo> createGameTestInfo(BlockPos pos, CommandSourceStack source, RetryOptions retryOptions) private static intcreateNewStructure(CommandSourceStack source, ResourceLocation id, int width, int height, int depth) private static BlockPosprivate static intexport(TestFinder testFinder) private static intexportTestStructure(CommandSourceStack source, Holder<GameTestInstance> testInstance) private static intlocate(TestFinder testFinder) static voidregister(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext buildContext) private static intreset(TestFinder testFinder) private static intresetGameTestInfo(CommandSourceStack source, GameTestInfo testInfo) private static intrun(TestFinder testFinder, RetryOptions retryOptions, int rotationSteps, int testsPerRow) private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> runWithRetryOptions(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> argumentBuilder, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> finderGetter) private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> runWithRetryOptions(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> argumentBuilder, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> finderGetter, Function<com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?>, com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?>> modifier) private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> runWithRetryOptionsAndBuildInfo(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> argumentBuilder, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> finderGetter) private static intshowPos(CommandSourceStack source, String variableName) private static intstatic CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTestFunction(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) private static Stream<GameTestInfo> toGameTestInfo(CommandSourceStack source, RetryOptions retryOptions, TestInstanceFinder finder, int rotationSteps) private static Stream<GameTestInfo> toGameTestInfos(CommandSourceStack source, RetryOptions retryOptions, TestPosFinder posFinder) static inttrackAndStartRunner(CommandSourceStack source, GameTestRunner testRunner) private static intverify(TestFinder testFinder) private static booleanverifyStructureExists(CommandSourceStack source, ResourceLocation structure)
-
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 testFinder) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
clear
private static int clear(TestFinder testFinder) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
export
private static int export(TestFinder testFinder) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
verify
-
run
private static int run(TestFinder testFinder, RetryOptions retryOptions, int rotationSteps, int testsPerRow) -
locate
private static int locate(TestFinder testFinder) 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, ?> argumentBuilder, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> finderGetter, Function<com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?>, com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?>> modifier) -
runWithRetryOptions
private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,?> runWithRetryOptions(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> argumentBuilder, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> finderGetter) -
runWithRetryOptionsAndBuildInfo
private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,?> runWithRetryOptionsAndBuildInfo(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> argumentBuilder, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> finderGetter) -
register
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext buildContext) -
suggestTestFunction
public static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTestFunction(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) -
resetGameTestInfo
-
toGameTestInfos
private static Stream<GameTestInfo> toGameTestInfos(CommandSourceStack source, RetryOptions retryOptions, TestPosFinder posFinder) -
toGameTestInfo
private static Stream<GameTestInfo> toGameTestInfo(CommandSourceStack source, RetryOptions retryOptions, TestInstanceFinder finder, int rotationSteps) -
createGameTestInfo
private static Optional<GameTestInfo> createGameTestInfo(BlockPos pos, CommandSourceStack source, RetryOptions retryOptions) -
createNewStructure
private static int createNewStructure(CommandSourceStack source, ResourceLocation id, int width, int height, int depth) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
showPos
private static int showPos(CommandSourceStack source, String variableName) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
stopTests
private static int stopTests() -
trackAndStartRunner
-
exportTestStructure
private static int exportTestStructure(CommandSourceStack source, Holder<GameTestInstance> testInstance) -
verifyStructureExists
-
createTestPositionAround
-