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 record
static final record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
private static final int
private static final int
private static final org.slf4j.Logger
private static final int
private static final int
private static final String
static final int
static final int
private static final int
private 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 int
createNewStructure
(CommandSourceStack pSource, String pStructureName, int pX, int pY, int pZ) (package private) static BlockPos
private static int
exportTestStructure
(CommandSourceStack pSource, String pStructurePath) private static int
importTestStructure
(CommandSourceStack pSource, String pStructurePath) static void
register
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> p_127947_) private static int
resetGameTestInfo
(GameTestInfo pGameTestInfo) private static com.mojang.brigadier.builder.ArgumentBuilder
<CommandSourceStack, ?> runWithRetryOptions
(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> p_320397_, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> p_320472_) private static com.mojang.brigadier.builder.ArgumentBuilder
<CommandSourceStack, ?> runWithRetryOptions
(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> p_320965_, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> p_320702_, Function<com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?>, com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?>> p_320600_) private static com.mojang.brigadier.builder.ArgumentBuilder
<CommandSourceStack, ?> runWithRetryOptionsAndBuildInfo
(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> p_320872_, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> p_320896_) (package private) static int
saveAndExportTestStructure
(CommandSourceStack pSource, StructureBlockEntity pStructureBlockEntity) (package private) static void
say
(CommandSourceStack pSource, String pMessage) (package private) static void
say
(ServerLevel pServerLevel, String pMessage, ChatFormatting pFormatting) private static int
showPos
(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 int
trackAndStartRunner
(CommandSourceStack pSource, ServerLevel pLevel, GameTestRunner pRunner) private static boolean
verifyStructureExists
(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, ?> p_320965_, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> p_320702_, Function<com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?>, com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?>> p_320600_) -
runWithRetryOptions
private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,?> runWithRetryOptions(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> p_320397_, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> p_320472_) -
runWithRetryOptionsAndBuildInfo
private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,?> runWithRetryOptionsAndBuildInfo(com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> p_320872_, Function<com.mojang.brigadier.context.CommandContext<CommandSourceStack>, TestCommand.Runner> p_320896_) -
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
-