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)
Fix template calls: add MC/ prefix
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
Line 1: Line 1:
{{MC/Distinguish|Commands/data}}
{{distinguish|Commands/data}}
{{MC/Exclusive|java}}
{{exclusive|java}}
{{Infobox command
{{Infobox command
|name=datapack
|name=datapack
Line 8: Line 8:
}}
}}


Controls the loading/unloading of data packs.
Controls the loading/unloading of [[Minecraft:data pack]]s.


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.
Note that feature flags can be enabled through data pack only when creating the [[Minecraft: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 <code>datapacks</code> in the vanilla datapack is enabled during world creating, it cannot be disabled by this command.
If a built-in datapack in the path of <code>datapacks</code> in the vanilla datapack is enabled during world creating, it cannot be disabled by this command.
Line 31: Line 31:
==Arguments==
==Arguments==


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


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


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


{{MC/Argument|description|string}}  
{{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>.
: {{MC/Arg desc|je=string|type=phrase}}
: {{arg desc|je=string|type=phrase}}


==Result==
==Result==
Line 60: Line 60:
== Output ==
== Output ==


{{MC/Output table}}
{{Output table}}
{{MC/Output table|edition=je|On fail|0|0|0}}
{{Output table|edition=je|On fail|0|0|0}}
{{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 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}}
{{MC/Output table}}
{{Output table}}


== History ==
== History ==


{{HistoryTable
{{HistoryTable
|{{MC/HistoryLine|java}}
|{{HistoryLine|java}}
|{{HistoryLine||1.13|dev=17w46a|Added {{MC/Cmd|datapack|link=none}}.}}
|{{HistoryLine||1.13|dev=17w46a|Added {{cmd|datapack|link=none}}.}}
|{{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.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>}}
|{{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|||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 {{MC/Cmd|datapack create|link=none}}.}}
|{{HistoryLine||1.21.6|dev=25w15a|Added {{cmd|datapack create|link=none}}.}}
}}
}}


Line 81: Line 81:


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


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

Latest revision as of 11:07, 1 July 2026

Template:Distinguish Template:Exclusive Template:Infobox command

Controls the loading/unloading of Minecraft:data packs.

Note that feature flags can be enabled through data pack only when creating the Minecraft: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

Template:Argument

Specifies the name of the data pack.
Template:Arg desc

Template:Argument

Specifies the name of an existing enabled data pack.
Template:Arg desc

Template:Argument

Created pack name, must be a valid directory name.
Template:Arg desc

Template:Argument

text component to be placed in description in pack.mcmeta.
Template:Arg desc

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

Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table

History

Template:HistoryTable

References

<references/>

Navigation

Template:Navbox commands

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