Minecraft – Creeper Holes – Minecraft

minecraft-java-editionminecraft-java-edition-server

Please I need help with some creeper issues on my private survival server. I want creepers to be exactly normal but one thing. They can't blow up grass and dirt. Everything else they should be able to destroy except grass and dirt.

Best Answer

A little trick with command blocks would help in this case:

Setup:

/scoreboard objectives add noFuse dummy
/scoreboard objectives add Teleport dummy

Clock:

/execute @e[type=ArmorStand,score_Teleport_min=1] clone ~10 200 ~10 ~-10 190 ~-10 ~10 ~10 ~10 filtered normal minecraft:dirt
/execute @e[type=ArmorStand,score_Teleport_min=1] clone ~10 200 ~10 ~-10 190 ~-10 ~10 ~10 ~10 filtered normal minecraft:grass
/execute @e[type=ArmorStand,score_Teleport_min=1] fill ~10 200 ~10 ~-10 190 ~-10 minecraft:air
/kill @e[type=ArmorStand,score_Teleport_min=1]
/scoreboard players set @e[type=Creeper] noFuse 0
/scoreboard players set @e[type=Creeper] noFuse 1 {Fuse:0}
/execute @e[score_noFuse_min=1] clone ~10 ~10 ~10 ~-10 ~-10 ~-10 ~10 200 ~10
/execute @e[score_noFuse_min=1] summon ArmorStand ~ ~ ~ {CustomName:"Teleport",CustomNameVisible:0}
/scoreboard players set @e[type=ArmorStand] Teleport 0
/scoreboard players set @e[type=ArmorStand] Teleport 1 {CustomName:"Teleport"}

First it finds all creepers that are about to explode, then clones the area around it into the sky, then after it explodes the dirt and the grass will be cloned down and the area in the sky will be deleted.