mojira.dev
MC-120370

Can't use the /fill command to replace with blocks that have block entities

The /fill command, when given a block type that has a block entity such as mob_spawner, expects parameter 9 to be the NBT data, even if parameter 8 is "replace". As such, the following command:

/fill ~-5 ~-5 ~-5 ~5 ~5 ~5 minecraft:mob_spawner 0 replace minecraft:mob_spawner 0 { Abbreviation: "really long JSON string" }

throws this error:

Data tag parsing failed: Expected '{' but got 'm' at: m<--[HERE]

Linked issues

Comments

Misode

Can confirm after testing

user-f2760

https://bugs.mojang.com/browse/MC-61864?focusedCommentId=175057&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-175057

@unknown added a comment - 16/Jul/14 11:16 PM
Replacing blocks with tile entities is not supported, this is due to a limitation in the parsing of commands. It may be changed in the future, but not until after 1.8. This issue should be considered a feature request, not a bug.

Andrio Celos

(Unassigned)

Community Consensus

Minecraft 1.12.1

Retrieved