Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/datapack: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Remove broken links to missing pages
SyncBot (talk | contribs)
Fix template calls: add MC/ prefix
 
Line 1: Line 1:
{{distinguish|Commands/data}}
{{MC/Distinguish|Commands/data}}
{{exclusive|java}}
{{MC/Exclusive|java}}
{{Infobox command
{{Infobox command
|name=datapack
|name=datapack
Line 31: Line 31:
==Arguments==
==Arguments==


{{argument|name|string}}
{{MC/Argument|name|string}}
: Specifies the name of the data pack.
: Specifies the name of the data pack.
: {{arg desc|je=string|type=phrase}}
: {{MC/Arg desc|je=string|type=phrase}}


{{argument|existing|string}}
{{MC/Argument|existing|string}}
: Specifies the name of an existing enabled data pack.
: Specifies the name of an existing enabled data pack.
: {{arg desc|je=string|type=phrase}}
: {{MC/Arg desc|je=string|type=phrase}}


{{argument|id|string}}
{{MC/Argument|id|string}}
: Created pack name, must be a valid directory name.
: Created pack name, must be a valid directory name.
: {{arg desc|je=string|type=phrase}}
: {{MC/Arg desc|je=string|type=phrase}}


{{argument|description|string}}  
{{MC/Argument|description|string}}  
: text component to be placed in description in <code>pack.mcmeta</code>.
: text component to be placed in description in <code>pack.mcmeta</code>.
: {{arg desc|je=string|type=phrase}}
: {{MC/Arg desc|je=string|type=phrase}}


==Result==
==Result==
Line 60: Line 60:
== 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=/datapack enable ...<br>/datapack disable ...|On success|1|1|The number of packs that are loaded after executing.}}
{{MC/Output table|cmd=/datapack enable ...<br>/datapack disable ...|On success|1|1|The number of packs that are loaded after executing.}}
{{Output table|cmd=/datapack list [available{{!}}enabled]|On success|1|1|the number of data packs that are listed}}
{{Output table|cmd=/datapack list [available{{!}}enabled]|On success|1|1|the number of data packs that are listed}}
{{Output table}}
{{MC/Output table}}


== History ==
== History ==


{{HistoryTable
{{HistoryTable
|{{HistoryLine|java}}
|{{MC/HistoryLine|java}}
|{{HistoryLine||1.13|dev=17w46a|Added {{cmd|datapack|link=none}}.}}
|{{HistoryLine||1.13|dev=17w46a|Added {{MC/Cmd|datapack|link=none}}.}}
|{{HistoryLine||1.19.3|dev=22w42a|Added feature flags. Data pack requiring feature flag that is not enabled cannot load by this command now.}}
|{{MC/HistoryLine||1.19.3|dev=22w42a|Added feature flags. Data pack requiring feature flag that is not enabled cannot load by this command now.}}
|{{HistoryLine||1.20.5|dev=24w11a|<code>/datapack disable</code> doesn't work in this snapshot.<ref>{{bug|MC-269373|||fixed}}</ref>}}
|{{HistoryLine||1.20.5|dev=24w11a|<code>/datapack disable</code> doesn't work in this snapshot.<ref>{{bug|MC-269373|||fixed}}</ref>}}
|{{HistoryLine|||dev=24w12a|If a built-in datapack in the path of <code>datapacks</code> in the vanilla datapack folder is enabled during world creation, it can no longer be disabled by this command.}}
|{{MC/HistoryLine|||dev=24w12a|If a built-in datapack in the path of <code>datapacks</code> in the vanilla datapack folder is enabled during world creation, it can no longer be disabled by this command.}}
|{{HistoryLine||1.21.6|dev=25w15a|Added {{cmd|datapack create|link=none}}.}}
|{{HistoryLine||1.21.6|dev=25w15a|Added {{MC/Cmd|datapack create|link=none}}.}}
}}
}}


Line 81: Line 81:


== Navigation ==
== Navigation ==
{{Navbox commands}}
{{MC/Navbox commands}}


de:Befehl/datapack
de:Befehl/datapack

Latest revision as of 20:09, 9 April 2026

Template:Hatnote Script error: No such module "Exclusive". Template:Infobox command

Controls the loading/unloading of data packs.

Note that feature flags can be enabled through data pack only when creating the world. Data packs requiring a feature flag that is not enabled cannot be loaded by this command.

If a built-in datapack in the path of datapacks in the vanilla datapack is enabled during world creating, it cannot be disabled by this command.

Syntax

datapack disable <name>
Disable the specified pack.
datapack enable <name>
Load the specified pack.
datapack enable <name> (first|last)
Load this pack before (lowest priority) or after (highest priority) all others (lowest or highest priority).
datapack enable <name> (before|after) <existing>
Load this pack just before (lower priority) or after (higher priority) an existing pack.
datapack list [available|enabled]
List all data packs, or list only the available/enabled ones. Hovering over the data packs in the chat output shows their description defined in their pack.mcmeta.
datapack create <id> <description>
Creates new empty directory data pack for current world.

Arguments

<name>: string

Specifies the name of the data pack.
{{#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|}}

<existing>: string

Specifies the name of an existing enabled data pack.
{{#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|}}

<id>: string

Created pack name, must be a valid directory name.
{{#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|}}

<description>: string

text component to be placed in description in pack.mcmeta.
{{#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|}}

Result

Template:Result table Template:Result table 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 packs that are loaded after executing.}}{{#vardefine:commands-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:command-{{#var:commands-num}}|/datapack enable ...
/datapack disable ...
}}{{#vardefine:command-row-{{#var:commands-num}}|1}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}} Template:Output table

{{#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

Template:HistoryTable

References

<references/>

Navigation

All editions
Removed
Template:El only
Debug
Removed
Template:Els only
Template:El only
Removed
Template:El only
Removed
Template:Els only
Removed
Joke
Related

de:Befehl/datapack es:Comandos/datapack ja:コマンド/datapack pt:Comandos/datapack ru:Команды консоли/datapack th:คำสั่ง/datapack zh:命令/datapack