Arrow that changes block that it hit
So I am trying to make arrow that changes red wool to orange wool. I tried:
/execute at @e[type=arrow,nbt={inBlockState:{Name:"minecraft:red_wool"}}] run setblock ~ ~ ~ orange_wool
and then to destroy
kill @e[type=arrow,nbt={inBlockState:{Name:"minecraft:orange_wool"}}]
as now it should be in orange wool.
But it makes this
I don't know what to do now. Please help. I am doing this in minecraft 1.16.1
Posted Jun 25, 2020, 12:57 PM UTC
22
Easiest and most efficient way to do would probably be to execute at every arrow that's in red wool, check what direction the block is in and then replace the block in that direction.
So that would be
/execute at @e[type=arrow,nbt={inBlockState:{Name:"minecraft:red_wool"}}] if block ~1 ~ ~ minecraft:red_wool run setblock ~1 ~ ~ orange_wool, repeated 5 more times except with~-1 ~ ~,~ ~1 ~,~ ~-1 ~,~ ~ ~1and~ ~ ~ ~-1.I did that but then when you shoot it in a hole it changes all of the adjacent red wool blocks. I overcame that using
x_rotation=-45..45etc. but then it's also not perfect as you can still hit one block and othethe r one will change. Then I mixed both methods but it's still not perfect. I am still looking for a better way.