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/blockdata: Difference between revisions

From SAS Gaming Wiki
imported>RedX
mNo edit summary
 
SyncBot (talk | contribs)
Remove broken links to missing pages
Line 1: Line 1:
{{Outdated feature|This command was superseded by the '''[[Minecraft:Commands/data|/data]]''' command in [[Minecraft:Java Edition 1.13]].|edition=java}}
{{Outdated feature|This command was superseded by the '''[[Minecraft:Commands/data|/data]]''' command in Java Edition 1.13.|edition=java}}
{{Infobox command
{{Infobox command
|name=blockdata
|name=blockdata
Line 5: Line 5:
}}
}}


Modifies the [[Minecraft:data tag]] of a [[Minecraft:block]].
Modifies the data tag of a [[Minecraft:block]].


== Syntax ==
== Syntax ==
Line 12: Line 12:
== Arguments ==
== Arguments ==
: ''x y z''
: ''x y z''
:: Specifies the [[Minecraft:coordinates]] of the block to be modified. May be provided in [[Minecraft:tilde notation]] to identify a position relative to the command's execution.
:: Specifies the [[Minecraft:coordinates]] of the block to be modified. May be provided in tilde notation to identify a position relative to the command's execution.


: ''dataTag''
: ''dataTag''
:: Specifies the [[Minecraft:data tag]] elements to be added to, or overwrite elements of, the specified block. Must be a compound [[Minecraft:NBT tag]] (for example, <code>{CustomName:Steve}</code>).
:: Specifies the data tag elements to be added to, or overwrite elements of, the specified block. Must be a compound NBT tag (for example, <code>{CustomName:Steve}</code>).


== Result ==
== Result ==
Line 23: Line 23:


== Examples ==
== Examples ==
* To change the primary power of the [[Minecraft:beacon]] at (0,64,0) to [[Minecraft:Haste]]: <code>blockdata 0 64 0 {Primary:3}</code>.
* To change the primary power of the [[Minecraft:beacon]] at (0,64,0) to Haste: <code>blockdata 0 64 0 {Primary:3}</code>.


== History ==
== History ==
Line 33: Line 33:


== See also ==
== See also ==
* [[Minecraft:Block entity format]] — defined data tags for tile entity blocks
* Block entity format — defined data tags for tile entity blocks
* {{cmd|entitydata}} — changes an entity's data tag
* {{cmd|entitydata}} — changes an entity's data tag
* {{cmd|replaceitem}} — replaces items in a block's inventory
* {{cmd|replaceitem}} — replaces items in a block's inventory
Line 42: Line 42:
{{Navbox commands}}
{{Navbox commands}}


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

Revision as of 15:43, 9 April 2026

Template:Outdated feature Template:Infobox command

Modifies the data tag of a Minecraft:block.

Syntax

blockdata <x> <y> <z> <dataTag> <UserCreator>

Arguments

x y z
Specifies the Minecraft:coordinates of the block to be modified. May be provided in tilde notation to identify a position relative to the command's execution.
dataTag
Specifies the data tag elements to be added to, or overwrite elements of, the specified block. Must be a compound NBT tag (for example, {CustomName:Steve}).

Result

Fails if the arguments are not specified correctly, or if the block is "not a data holder block," as in it is not associated with a Minecraft:block entity.

On success, modifies the data tag of the targeted block.

Examples

  • To change the primary power of the Minecraft:beacon at (0,64,0) to Haste: blockdata 0 64 0 {Primary:3}.

History

Template:HistoryTable

See also

Navigation

Template:Navbox commands

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