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 pPos, ServerLevel pLevel, RetryOptions pRetryOptions) private static intcreateNewStructure(CommandSourceStack pSource, String pStructureName, int pX, int pY, int pZ) (package private) static BlockPosprivate static intexportTestStructure(CommandSourceStack pSource, String pStructurePath) private static intimportTestStructure(CommandSourceStack pSource, String pStructurePath) static voidregister(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> pDispatcher) private static intresetGameTestInfo(GameTestInfo pGameTestInfo) private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> runWithRetryOptions(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> pArgumentBuilder, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> pRunnerGetter) private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> runWithRetryOptions(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> pArgumentBuilder, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> pRunnerGetter, 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, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> pRunnerGetter) (package private) static intsaveAndExportTestStructure(CommandSourceStack pSource, StructureBlockEntity pStructureBlockEntity) (package private) static voidsay(CommandSourceStack pSource, String pMessage) (package private) static voidsay(ServerLevel pServerLevel, String pMessage, ChatFormatting pFormatting) private static intshowPos(CommandSourceStack pSource, String pVariableName) (package private) static int(package private) static Stream<GameTestInfo> toGameTestInfo(CommandSourceStack pSource, RetryOptions pRetryOptions, TestFunctionFinder pTestFunctionFinder, int pRotationSteps) (package private) static Stream<GameTestInfo> toGameTestInfos(CommandSourceStack pSource, RetryOptions pRetryOptions, StructureBlockPosFinder pStructureBlockPosFinder) (package private) static inttrackAndStartRunner(CommandSourceStack pSource, ServerLevel pLevel, GameTestRunner pRunner) private static booleanverifyStructureExists(ServerLevel pLevel, String pStructure)
-
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, ?> pArgumentBuilder, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> pRunnerGetter, 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, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> pRunnerGetter) -
runWithRetryOptionsAndBuildInfo
private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,?> runWithRetryOptionsAndBuildInfo(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> pArgumentBuilder, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> pRunnerGetter) -
register
-
resetGameTestInfo
-
toGameTestInfos
static Stream<GameTestInfo> toGameTestInfos(CommandSourceStack pSource, RetryOptions pRetryOptions, StructureBlockPosFinder pStructureBlockPosFinder) -
toGameTestInfo
static Stream<GameTestInfo> toGameTestInfo(CommandSourceStack pSource, RetryOptions pRetryOptions, TestFunctionFinder pTestFunctionFinder, int pRotationSteps) -
createGameTestInfo
private static Optional<GameTestInfo> createGameTestInfo(BlockPos pPos, ServerLevel pLevel, RetryOptions pRetryOptions) -
createNewStructure
private static int createNewStructure(CommandSourceStack pSource, String pStructureName, int pX, int pY, int pZ) -
showPos
private static int showPos(CommandSourceStack pSource, String pVariableName) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
stopTests
static int stopTests() -
trackAndStartRunner
static int trackAndStartRunner(CommandSourceStack pSource, ServerLevel pLevel, GameTestRunner pRunner) -
saveAndExportTestStructure
static int saveAndExportTestStructure(CommandSourceStack pSource, StructureBlockEntity pStructureBlockEntity) -
exportTestStructure
-
verifyStructureExists
-
createTestPositionAround
-
say
-
importTestStructure
-
say
-