mojira.dev
MC-48958

/blockdata gives a strange error when entering Items in a command block

The following command:

/blockdata ~ ~-2 ~ {Items:[{id:book,Count:1,Damage:0}]}

When used in a command block gives this error:

[02:42:03] '' is not a valid number

however it works fine when you input it in the the chat.

Attachments

Comments 4

Cannot confirm with

blockdata ~ ~-2 ~ {Items:[{id:book,Count:1,Damage:0}]}

, see screenshots.

I went back and tried this.

The original command I was using:

/blockdata  ~ ~-2 ~ {Lock:"true",Items:[{id:command_block,Count:1,Damage:0,Command:"/clone 1284 56 262 1285 58 264 ~-1 ~-2 ~-1"}]}

Which is wrong but it does give the error above, and then any blockdata command will give the same error in that command block.

The correct command for the the above turns out to be:

blockdata ~ ~-2 ~ {Items:[{id:command_block,Count:1,Damage:0,tag:{BlockEntityTag:{Command:"/clone 1284 56 262 1285 58 264 ~-1 ~-2 ~-1"}}}]}

Yes you just had one space too much in front of the first "~"

London Summers

(Unassigned)

Unconfirmed

Minecraft 14w07a

Retrieved