Minecraft:Commands/blockdata: Difference between revisions
From SAS Gaming Wiki
More actions
imported>RedX mNo edit summary |
Fix template calls: add MC/ prefix |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Outdated feature|This command was superseded by the '''[[Minecraft:Commands/data|/data]]''' command in | {{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 | 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 | :: 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 | :: 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 | * 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 == | ||
{{HistoryTable | {{HistoryTable | ||
|{{HistoryLine|java}} | |{{MC/HistoryLine|java}} | ||
|{{HistoryLine||1.8|dev=14w02a|Added {{ | |{{HistoryLine||1.8|dev=14w02a|Added {{MC/Cmd|blockdata|link=none}}.}} | ||
|{{HistoryLine||1.13|dev=17w47a|Removed {{ | |{{HistoryLine||1.13|dev=17w47a|Removed {{MC/Cmd|blockdata|link=none}} as its features are merged into {{MC/Cmd|data}}.}} | ||
}} | }} | ||
== See also == | == See also == | ||
* | * Block entity format — defined data tags for tile entity blocks | ||
* {{ | * {{MC/Cmd|entitydata}} — changes an entity's data tag | ||
* {{ | * {{MC/Cmd|replaceitem}} — replaces items in a block's inventory | ||
* {{ | * {{MC/Cmd|setblock}} – places a new block at a position | ||
* {{ | * {{MC/Cmd|stats}} — sets a block's {{MC/Cd|CommandStats}} | ||
== Navigation == | == Navigation == | ||
{{Navbox commands}} | {{MC/Navbox commands}} | ||
de:Befehl/blockdata | |||
es:Comandos/blockdata | |||
ja:コマンド/blockdata | |||
pt:Comandos/blockdata | |||
ru:Команды консоли/blockdata | |||
zh:命令/blockdata | |||
Latest revision as of 20:08, 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}).
- Specifies the data tag elements to be added to, or overwrite elements of, the specified block. Must be a compound NBT tag (for example,
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
See also
- Block entity format — defined data tags for tile entity blocks
- REDIRECT Template:Command
Template:Redr — changes an entity's data tag
- REDIRECT Template:Command
Template:Redr — replaces items in a block's inventory
- REDIRECT Template:Command
Template:Redr – places a new block at a position
- REDIRECT Template:Command
Template:Redr — sets a block's
- REDIRECT Template:Code
de:Befehl/blockdata es:Comandos/blockdata ja:コマンド/blockdata pt:Comandos/blockdata ru:Команды консоли/blockdata zh:命令/blockdata