Datapack Codex

Commands/blockdata

Minecraft Wiki article. Categories: Removed_features, Commands

📌 Mirrored from Minecraft Wiki

This article is reproduced from Commands/blockdata on the Minecraft Wiki. Mirrored from revision 3256450. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.

BlockSprite rose.png: Sprite image for rose in Minecraft
This page describes content that has been removed and was only present in earlier versions of Java Edition.
 
This command was superseded by the /data command in Java Edition 1.13.
/blockdata

Modifies the data tag of a block.

Syntax

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

Arguments

x y z
Specifies the 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 block entity.

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

Examples

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

History

Java Edition
1.814w02aAdded /blockdata.
1.1317w47aRemoved /blockdata as its features are merged into /data.

See also

Sources