I want it so that when an anvil gets used up, it will put another one in it's place. Someone told me to use /execute @a ~ ~ ~ detect ~ ~-1 ~ minecraft:snow 0 /setblock ~ ~-1 ~ minecraft:air 0
, but it says
"/setblock is not a valid number"
minecraft-commandsminecraft-java-edition
I want it so that when an anvil gets used up, it will put another one in it's place. Someone told me to use /execute @a ~ ~ ~ detect ~ ~-1 ~ minecraft:snow 0 /setblock ~ ~-1 ~ minecraft:air 0
, but it says
"/setblock is not a valid number"
Best Answer
If I understand correctly... You want to refill the anvil when it's broke. So use this
It would test for every ArmorStand that named "Anvilblock" And if you want self-repair anvil just stand on where you want it to be placed and do
Invisible make it invisible and Marker make It's hitbox's size to 0. And when you don't want it anymore, Stand near it and do
Be sure to turn off commandBlockOutput in /gamerule
Hope that's help!