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 pTestFinder) private static Optional<GameTestInfo> createGameTestInfo(BlockPos pPos, CommandSourceStack pSource, RetryOptions pRetryOptions) private static intcreateNewStructure(CommandSourceStack pSource, ResourceLocation pId, int pWidth, int pHeight, int pDepth) private static BlockPosprivate static intexport(TestFinder pTestFinder) private static intexportTestStructure(CommandSourceStack pSource, Holder<GameTestInstance> pTestInstance) private static intlocate(TestFinder pTestFinder) static voidregister(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> pDispatcher, CommandBuildContext pBuildContext) private static intreset(TestFinder pTestFinder) private static intresetGameTestInfo(CommandSourceStack pSource, GameTestInfo pTestInfo) private static intrun(TestFinder pTestFinder, RetryOptions pRetryOptions, int pRotationSteps, int pTestsPerRow) private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> runWithRetryOptions(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> pArgumentBuilder, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> pFinderGetter) private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> runWithRetryOptions(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> pArgumentBuilder, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> pFinderGetter, Function<com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?>, com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?>> pModifier) private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> runWithRetryOptionsAndBuildInfo(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> pArgumentBuilder, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> pFinderGetter) private static intshowPos(CommandSourceStack pSource, String pVariableName) private static intstatic CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTestFunction(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, com.mojang.brigadier.suggestion.SuggestionsBuilder pBuilder) 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 inttrackAndStartRunner(CommandSourceStack pSource, GameTestRunner pTestRunner) private static intverify(TestFinder pTestFinder) private static booleanverifyStructureExists(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, ?> pArgumentBuilder, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> pFinderGetter, Function<com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?>, com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?>> pModifier) -
runWithRetryOptions
private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,?> runWithRetryOptions(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> pArgumentBuilder, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> pFinderGetter) -
runWithRetryOptionsAndBuildInfo
private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,?> runWithRetryOptionsAndBuildInfo(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> pArgumentBuilder, InCommandFunction<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestFinder> pFinderGetter) -
register
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> pDispatcher, CommandBuildContext pBuildContext) -
suggestTestFunction
public static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTestFunction(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, com.mojang.brigadier.suggestion.SuggestionsBuilder pBuilder) -
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
-