How do I make a clickable signs set a block?
After 1.7, you can no longer refer to a block by its numeric Block ID; instead you must use its full name. Thus, you should replace 152
with redstone_block
.
Also, with /setblock
, you need to specify the [dataValue]
before you can specify the [oldBlockHandling]
mode, so you should add a 0
before delete
.
Fixed command should look like:
/setblock ~ ~1 ~ minecraft:wall_sign 2 replace {Text1:"{\"text\":\"Set Gamemodes\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/setblock -44 110 248 redstone_block 0 delete\"}}"}
In situations like this where you're setting signs that execute commands or have nested execute commands, I often find it useful to "unwrap" it and try each layer of command separately.
For example, you can try the innermost command (/setblock -44 110 248 152 delete
) in chat or a command block to get a somewhat useful message that can help you with fixing the first error:
There is no such block with name minecraft:152