Package net.minecraft.gametest.framework
Class TestCommand
java.lang.Object
net.minecraft.gametest.framework.TestCommand
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class(package private) static final recordstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final intprivate static final intprivate static final org.slf4j.Loggerprivate static final intprivate static final intprivate static final Stringstatic final intstatic final intprivate static final intprivate static final TestFinder.Builder<TestCommand.Runner> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Optional<GameTestInfo> createGameTestInfo(BlockPos pos, ServerLevel level, RetryOptions retryOptions) private static intcreateNewStructure(CommandSourceStack source, String structureName, int x, int y, int z) (package private) static BlockPosprivate static intexportTestStructure(CommandSourceStack source, String structurePath) private static intimportTestStructure(CommandSourceStack source, String structurePath) static voidregister(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher) private static intresetGameTestInfo(GameTestInfo gameTestInfo) private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> runWithRetryOptions(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> argumentBuilder, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> runnerGetter) private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> runWithRetryOptions(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> argumentBuilder, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> runnerGetter, 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, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> runnerGetter) (package private) static intsaveAndExportTestStructure(CommandSourceStack source, StructureBlockEntity structureBlockEntity) (package private) static voidsay(CommandSourceStack source, String message) (package private) static voidsay(ServerLevel serverLevel, String message, ChatFormatting formatting) private static intshowPos(CommandSourceStack source, String variableName) (package private) static int(package private) static Stream<GameTestInfo> toGameTestInfo(CommandSourceStack source, RetryOptions retryOptions, TestFunctionFinder testFunctionFinder, int rotationSteps) (package private) static Stream<GameTestInfo> toGameTestInfos(CommandSourceStack source, RetryOptions retryOptions, StructureBlockPosFinder structureBlockPosFinder) (package private) static inttrackAndStartRunner(CommandSourceStack source, ServerLevel level, GameTestRunner runner) private static booleanverifyStructureExists(ServerLevel level, String structure)
-
Field Details
-
STRUCTURE_BLOCK_NEARBY_SEARCH_RADIUS
public static final int STRUCTURE_BLOCK_NEARBY_SEARCH_RADIUS- See Also:
-
STRUCTURE_BLOCK_FULL_SEARCH_RADIUS
public static final int STRUCTURE_BLOCK_FULL_SEARCH_RADIUS- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
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:
-
STRUCTURE_BLOCK_ENTITY_COULD_NOT_BE_FOUND
- See Also:
-
testFinder
-
-
Constructor Details
-
TestCommand
public TestCommand()
-
-
Method Details
-
runWithRetryOptions
private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,?> runWithRetryOptions(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> argumentBuilder, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> runnerGetter, 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, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> runnerGetter) -
runWithRetryOptionsAndBuildInfo
private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,?> runWithRetryOptionsAndBuildInfo(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> argumentBuilder, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> runnerGetter) -
register
-
resetGameTestInfo
-
toGameTestInfos
static Stream<GameTestInfo> toGameTestInfos(CommandSourceStack source, RetryOptions retryOptions, StructureBlockPosFinder structureBlockPosFinder) -
toGameTestInfo
static Stream<GameTestInfo> toGameTestInfo(CommandSourceStack source, RetryOptions retryOptions, TestFunctionFinder testFunctionFinder, int rotationSteps) -
createGameTestInfo
private static Optional<GameTestInfo> createGameTestInfo(BlockPos pos, ServerLevel level, RetryOptions retryOptions) -
createNewStructure
private static int createNewStructure(CommandSourceStack source, String structureName, int x, int y, int z) -
showPos
private static int showPos(CommandSourceStack source, String variableName) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
stopTests
static int stopTests() -
trackAndStartRunner
-
saveAndExportTestStructure
static int saveAndExportTestStructure(CommandSourceStack source, StructureBlockEntity structureBlockEntity) -
exportTestStructure
-
verifyStructureExists
-
createTestPositionAround
-
say
-
importTestStructure
-
say
-