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/entitydata: 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:
{{Outdated feature|This command was superseded by the '''[[Minecraft:Commands/data|/data]]''' command in Java Edition 1.13.|edition=java}}
{{Outdated feature|This command was superseded by the '''[[Minecraft:Commands/data|/data]]''' command in [[Minecraft:Java Edition 1.13]].|edition=java}}
{{MC/Exclusive|java}}
{{Infobox command
{{Infobox command
|name=entitydata
|name=entitydata
Line 6: Line 5:
}}
}}


Modifies the data tag of an entity.
Modifies the [[Minecraft:data tag]] of an [[Minecraft:entity]].


== Syntax ==
== Syntax ==
Line 18: Line 17:


: ''dataTag''
: ''dataTag''
:: Specifies the [[Minecraft:Commands#Data tags|data tag]] elements to be added to, or overwrite elements of, the specified entity (data tags cannot be removed and strings cannot be set to a null value). Must be a compound NBT tag (for example, <code>{CustomName:Steve}</code>).
:: Specifies the [[Minecraft:Commands#Data tags|data tag]] elements to be added to, or overwrite elements of, the specified entity (data tags cannot be removed and strings cannot be set to a null value). Must be a compound [[Minecraft:NBT tag]] (for example, <code>{CustomName:Steve}</code>).


== Result ==
== Result ==


Fails if the arguments are not specified correctly, or if ''entity'' fails to resolve to one or more non-player entities (players cannot be changed).
Fails if the arguments are not specified correctly, or if ''entity'' fails to resolve to one or more non-player entities ([[Minecraft:players]] cannot be changed).


On success, modifies the data tag of the targeted entity or entities.
On success, modifies the data tag of the targeted entity or entities.
Line 33: Line 32:
== History ==
== History ==
{{HistoryTable
{{HistoryTable
|{{MC/HistoryLine|java}}
|{{HistoryLine|java}}
|{{HistoryLine||1.8|dev=14w32b|Added {{MC/Cmd|entitydata|link=none}}.}}
|{{HistoryLine||1.8|dev=14w32b|Added {{cmd|entitydata|link=none}}.}}
|{{HistoryLine||1.13|dev=17w45b|Removed {{MC/Cmd|entitydata|link=none}} as its features are merged into {{MC/Cmd|data}}.}}
|{{HistoryLine||1.13|dev=17w45b|Removed {{cmd|entitydata|link=none}} as its features are merged into {{cmd|data}}.}}
}}
}}


== See also ==
== See also ==
* {{MC/Cmd|blockdata}} — replaces the data of a block
* {{cmd|blockdata}} — replaces the data of a block


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


de:Befehl/entitydata
[[Minecraft:de:Befehl/entitydata]]
es:Comandos/entitydata
[[Minecraft:es:Comandos/entitydata]]
ja:コマンド/entitydata
[[Minecraft:ja:コマンド/entitydata]]
pt:Comandos/entitydata
[[Minecraft:pt:Comandos/entitydata]]
ru:Команды консоли/entitydata
[[Minecraft:ru:Команды консоли/entitydata]]
zh:命令/entitydata
[[Minecraft:zh:命令/entitydata]]

Latest revision as of 11:11, 10 July 2026

Template:Outdated feature Template:Infobox command

Modifies the Minecraft:data tag of an Minecraft:entity.

Syntax

entitydata <entity> <dataTag>

Arguments

entity
Specifies the entity or entities to be modified. Must be an entity UUID or the @e target selector.
dataTag
Specifies the data tag elements to be added to, or overwrite elements of, the specified entity (data tags cannot be removed and strings cannot be set to a null value). Must be a compound Minecraft:NBT tag (for example, {CustomName:Steve}).

Result

Fails if the arguments are not specified correctly, or if entity fails to resolve to one or more non-player entities (Minecraft:players cannot be changed).

On success, modifies the data tag of the targeted entity or entities.

Examples

  • To prevent all zombies from picking up loot:
    entitydata @e[type=zombie] {CanPickUpLoot:0}

History

Template:HistoryTable

See also

Navigation

Template:Navbox commands

Minecraft:de:Befehl/entitydata Minecraft:es:Comandos/entitydata Minecraft:ja:コマンド/entitydata Minecraft:pt:Comandos/entitydata Minecraft:ru:Команды консоли/entitydata Minecraft:zh:命令/entitydata