Minecraft:Commands/test: Difference between revisions
More actions
Remove broken links to missing pages |
Fix template calls: add MC/ prefix |
||
| Line 1: | Line 1: | ||
{{ | {{MC/Distinguish|Commands/test (Bedrock Edition)}} | ||
{{Exclusive|java}} | {{MC/Exclusive|java}} | ||
{{Infobox command | {{Infobox command | ||
|name=test | |name=test | ||
| Line 34: | Line 34: | ||
== Arguments == | == Arguments == | ||
{{ | {{MC/Cd|clearall}} | ||
: Clears all tests within a specified radius. | : Clears all tests within a specified radius. | ||
{{ | {{MC/Cd|d=and|resetclosest|runclosest|exportclosest}} | ||
: Resets, runs, and exports the closest test within a radius of 15. | : Resets, runs, and exports the closest test within a radius of 15. | ||
{{ | {{MC/Cd|d=and|clearthat|resetthat|runthat|exportthat}} | ||
: Clears, resets, runs, and exports the test where the crosshair points. | : Clears, resets, runs, and exports the test where the crosshair points. | ||
{{ | {{MC/Cd|d=and|clearthese|resetthese|runthese|exportthese}} | ||
: Clears, resets, runs, and exports all the tests within a radius of 200. | : Clears, resets, runs, and exports all the tests within a radius of 200. | ||
{{ | {{MC/Argument|radius|integer}} | ||
: Specifies the radius to clear tests within. Defaults to 200. | : Specifies the radius to clear tests within. Defaults to 200. | ||
: {{ | : {{MC/Arg desc|je=integer}} | ||
{{ | {{MC/Argument|id|resource_location}} | ||
: Specifies the ID of a test. | : Specifies the ID of a test. | ||
: {{ | : {{MC/Arg desc|je=resource_location}} | ||
{{ | {{MC/Argument|width|integer}} | ||
: Specifies the width of the test structure. Defaults to 5. | : Specifies the width of the test structure. Defaults to 5. | ||
: {{ | : {{MC/Arg desc|je=integer}} | ||
{{ | {{MC/Argument|height|integer}} | ||
: Specifies the height of the test structure. Defaults to the value of {{ | : Specifies the height of the test structure. Defaults to the value of {{MC/Cd|<width>}}. | ||
: {{ | : {{MC/Arg desc|je=integer}} | ||
{{ | {{MC/Argument|depth|integer}} | ||
: Specifies the depth of the test structure. Defaults to the value of {{ | : Specifies the depth of the test structure. Defaults to the value of {{MC/Cd|<width>}}. | ||
: {{ | : {{MC/Arg desc|je=integer}} | ||
{{ | {{MC/Argument|var|string}} | ||
: Specifies the variable name to include in the copied code snippet. Defaults to {{ | : Specifies the variable name to include in the copied code snippet. Defaults to {{MC/Cd|pos}}. | ||
: {{ | : {{MC/Arg desc|je=string}} | ||
{{ | {{MC/Argument|tests|resource_selector}} | ||
: Specifies the ID of a test.<!-- | : Specifies the ID of a test.<!-- | ||
: {{ | : {{MC/Arg desc|je=resource_selector}}--> | ||
{{ | {{MC/Argument|numberOfTimes|integer}} | ||
: Specifies the number of times to repeat each test in different batches. Defaults to 1. | : Specifies the number of times to repeat each test in different batches. Defaults to 1. | ||
: {{ | : {{MC/Arg desc|je=integer}} | ||
{{ | {{MC/Argument|untilFailed|bool}} | ||
: Specifies if the test should be stopped as soon as one iteration fails. Defaults to {{ | : Specifies if the test should be stopped as soon as one iteration fails. Defaults to {{MC/Cd|false}}. | ||
: {{ | : {{MC/Arg desc|je=bool}} | ||
{{ | {{MC/Argument|rotationSteps|integer}} | ||
: Specifies the number of extra 90 degree steps to apply to the test. Defaults to 0. | : Specifies the number of extra 90 degree steps to apply to the test. Defaults to 0. | ||
: {{ | : {{MC/Arg desc|je=integer}} | ||
{{ | {{MC/Argument|testsPerRow|integer}} | ||
: Specifies the number of tests to place per row in a grid layout. Defaults to 8. | : Specifies the number of tests to place per row in a grid layout. Defaults to 8. | ||
: {{ | : {{MC/Arg desc|je=integer}} | ||
{{ | {{MC/Argument|amount|integer}} | ||
: Specifies the number of times to repeat each test in the same batch. Defaults to 1. | : Specifies the number of times to repeat each test in the same batch. Defaults to 1. | ||
: {{ | : {{MC/Arg desc|je=integer}} | ||
{{ | {{MC/Argument|onlyRequiredTests|bool}} | ||
: Specifies if only necessary tests are needed. Defaults to {{ | : Specifies if only necessary tests are needed. Defaults to {{MC/Cd|false}}. | ||
: {{ | : {{MC/Arg desc|je=bool}} | ||
{{ | {{MC/Argument|test|resource}} | ||
: Specifies the ID of a test. | : Specifies the ID of a test. | ||
: {{ | : {{MC/Arg desc|je=resource}} | ||
== Result == | == Result == | ||
| Line 106: | Line 106: | ||
{{Result table|The command is incomplete, or any argument is not specified correctly.|unparseable}} | {{Result table|The command is incomplete, or any argument is not specified correctly.|unparseable}} | ||
{{Result table|The test does not exist.|fail}} | {{Result table|The test does not exist.|fail}} | ||
{{Result table|cmd=/test create ...|{{ | {{Result table|cmd=/test create ...|{{MC/Cd|d=or|<width>|<height>|<depth>}} is greater than 48.}} | ||
{{Result table|cmd=|succeed}} | {{Result table|cmd=|succeed}} | ||
{{Result table}} | {{Result table}} | ||
== Output == | == Output == | ||
{{Output table}} | {{MC/Output table}} | ||
{{Output table|edition=je|On fail|0|0|0}} | {{MC/Output table|edition=je|On fail|0|0|0}} | ||
{{Output table|cmd=/test clear ...<br>/test reset ...|On success|1|1|the number of cleared/reset test structures}} | {{MC/Output table|cmd=/test clear ...<br>/test reset ...|On success|1|1|the number of cleared/reset test structures}} | ||
{{Output table|cmd=|On success|1|1|1}} | {{MC/Output table|cmd=|On success|1|1|1}} | ||
{{Output table}} | {{MC/Output table}} | ||
== History == | == History == | ||
{{HistoryTable | {{HistoryTable | ||
|{{HistoryLine|java}} | |{{MC/HistoryLine|java}} | ||
|{{HistoryLine||1.15|dev=19w34a|Added {{ | |{{HistoryLine||1.15|dev=19w34a|Added {{MC/Cmd|test|link=none}}, only available in IDE environment.}} | ||
|{{HistoryLine||1.21.5|dev=25w03a|{{ | |{{HistoryLine||1.21.5|dev=25w03a|{{MC/Cmd|test|link=none}} is now accessible through normal gameplay.}} | ||
}} | }} | ||
== Navigation == | == Navigation == | ||
{{Navbox commands}} | {{MC/Navbox commands}} | ||
de:Befehl/test | de:Befehl/test | ||
Latest revision as of 20:14, 9 April 2026
Template:Hatnote Script error: No such module "Exclusive". Template:Infobox command
Manage and execute Minecraft:GameTests.
Syntax
test (clearall [<radius>]|clearthat|clearthese)- Clears the structures and blocks associated with the tests.
test create <id> [<width>] [<height> <depth>]- Creates a test.
test locate <tests>- Locates tests in loaded chunks.
test pos [<var>]- Shows the local coordinates to the block pointed at in the test.
test (resetclosest|resetthat|resetthese)- Resets the structures for the tests.
test run <tests> [<numberOfTimes>] [<untilFailed>] [<rotationSteps>] [<testsPerRow>]test (runclosest|runthat|runthese) [<numberOfTimes>] [<untilFailed>]test runmultiple <tests> [<amount>]- Runs one or more tests.
test runfailed [<numberOfTimes>] [<untilFailed>] [<rotationSteps>] [<testsPerRow>]test runfailed [<onlyRequiredTests>] [<numberOfTimes>]- Runs failed tests.
test stop- Stops all tests.
test verify <tests>- Verifies tests.
test (export <test>|exportclosest|exportthat|exportthese)- Exports tests. Only available in IDE environment.
Arguments
- REDIRECT Template:Code
- Clears all tests within a specified radius.
- REDIRECT Template:Code
- Resets, runs, and exports the closest test within a radius of 15.
- REDIRECT Template:Code
- Clears, resets, runs, and exports the test where the crosshair points.
- REDIRECT Template:Code
- Clears, resets, runs, and exports all the tests within a radius of 200.
<radius>: integer
- Specifies the radius to clear tests within. Defaults to 200.
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|integer}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
<id>: resource_location
- Specifies the ID of a test.
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|resource_location}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
<width>: integer
- Specifies the width of the test structure. Defaults to 5.
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|integer}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
<height>: integer
- Specifies the height of the test structure. Defaults to the value of
- REDIRECT Template:Code
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|integer}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
<depth>: integer
- Specifies the depth of the test structure. Defaults to the value of
- REDIRECT Template:Code
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|integer}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
<var>: string
- Specifies the variable name to include in the copied code snippet. Defaults to
- REDIRECT Template:Code
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|string}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
<tests>: resource_selector
- Specifies the ID of a test.
<numberOfTimes>: integer
- Specifies the number of times to repeat each test in different batches. Defaults to 1.
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|integer}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
<untilFailed>: bool
- Specifies if the test should be stopped as soon as one iteration fails. Defaults to
- REDIRECT Template:Code
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|bool}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
<rotationSteps>: integer
- Specifies the number of extra 90 degree steps to apply to the test. Defaults to 0.
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|integer}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
<testsPerRow>: integer
- Specifies the number of tests to place per row in a grid layout. Defaults to 8.
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|integer}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
<amount>: integer
- Specifies the number of times to repeat each test in the same batch. Defaults to 1.
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|integer}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
<onlyRequiredTests>: bool
- Specifies if only necessary tests are needed. Defaults to
- REDIRECT Template:Code
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|bool}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
<test>: resource
- Specifies the ID of a test.
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|resource}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
Result
Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table
Output
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On fail}}{{#vardefine:output1-{{#var:output-table-lines}}|0}}{{#vardefine:output2-{{#var:output-table-lines}}|0}}{{#vardefine:output3-{{#var:output-table-lines}}|0}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|je}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|the number of cleared/reset test structures}}{{#vardefine:commands-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:command-{{#var:commands-num}}|/test clear ...}}{{#vardefine:command-row-{{#var:commands-num}}|1}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|1}}{{#vardefine:commands-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:command-{{#var:commands-num}}|Any}}{{#vardefine:command-row-{{#var:commands-num}}|1}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}}
/test reset ...
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}
History
de:Befehl/test ja:コマンド/test pt:Comandos/test ru:Команды консоли/test zh:命令/test