I'm trying to put slab in my nether by command (I and my Friend don't have the time for that but we still want to enjoy some game mechanics link to that)
I wanted to try a command like that :
Execute at @a as @a if block ~ ~ ~ Minecraft :netherrack run setblock ~ ~-1 ~ stone_slab[position=bottom]
My idea was to let the nether fill itself with entity moving, and like that delete spawn zone block by block.
And After that I would duplicate this command for soul sand, quartz, and magma block.
But i'm not good with command and it seems to not working...
Anyone can help me ?
If you're wanting other entities to move around and place stone slabs to prevent spawning, it would be more like.
/execute in minecraft:the_nether at @e[distance=0..] if block ~ ~-1 ~ minecraft:netherrack unless block ~ ~ ~ minecraft:stone_slab run setblock ~ ~ ~ minecraft:stone_slab[type=bottom] replace air
Big Sister Minecraft Server! Apply for whitelist here:
Oh ok I learned that we can use IF and unless in the same command, did not know that.
Can you explain why you write the unless part on your command ?
Thanks, can I make a command that would also kill zombie pigmen that have put a slab ?
Like create a scoreboradif they have a netherrack at ~ ~-1 ~, it increase it by one and kill the entity with a score superior to 0 ?
The unless is so it doesn't keep replacing stone slabs with stone slabs, but doesn't really serve any purpose.
As for killing ones that have already placed one you could do another repeating command that has
/execute as @e at @e if block ~ ~ ~ minecraft:stone_slab run kill @s