Java 26.2
/data merge block
/data merge block
Merge SNBT into a block entity.
/data merge block ~ ~ ~ {CustomName:'{"text":"NBTForge"}'}Merge block NBT
Replacing a block resets its data; /data merge block edits the block entity that is already there — a spawner delay, a chest Lock tag, sign text — keyed by exact coordinates. Compose the NBT payload here and point it at the right position.
Replacing a block with /setblock resets its data. /data merge block edits the block entity that is already there -- a spawner delay, a chest Lock, sign text -- without rebuilding it, so anything already inside is preserved.
Give exact x y z coordinates of the block entity. Only chests, spawners, signs, furnaces, hoppers and other block entities store NBT; a plain stone block has nothing to merge into.
No. /data is Java Edition only; Bedrock has no runtime NBT-merge command. The generator marks this output as Java-only.
Java 26.2
Merge SNBT into a block entity.
/data merge block ~ ~ ~ {CustomName:'{"text":"NBTForge"}'}