Maps Redstone Device

Landmines | Command Block Tutorial

  • 1.9k views 1 today
Progress
100% complete
  • 1
  • 0
FunkyMunkey
Lvl 35Artisan Taco
10
Hello PMC!!!

Today I am back with another command block tutorial: Landmines!!!
I know what you are thinking: Pressure plates and TNT. But any idiot can deal with that. Today I come with command blocks! To make special land mines! I will stop now! Here are the commands and how they work:

First command:
/execute @a ~ ~ ~ detect ~ ~ ~ stone_button 5 gamerule mobGriefing false
REPEATING | ALWAYS ACTIVE
This command block detects when a player is stepping on a button. If so is true, the command block changes the gamerule of mob griefing to false.

Second Command:
/execute @a ~ ~ ~ detect ~ ~ ~ stone_button 5 summon Creeper ~ ~ ~ {ignited:1,ExplosionRadius:3,Fuse:0,CustomName:"Landmine"}
CHAIN | ALWAYS ACTIVE
After the gamerule gets updated, a creeper with a fuse time of 0 gets summoned. It doesn't blow up the surroundings though, because of the gamerule.

Third Command:
/execute @a ~ ~ ~ detect ~ ~ ~ stone_button 5 setblock ~ ~ ~ air 0 replace stone_button 5
CHAIN | ALWAYS ACTIVE
This command block just removes the stone button from the ground. If the stone button doesn't get replaced, creepers will keep on spawning

COMPARATOR
This is used to delay the signal by one tick.

Last Command:
/gamerule mobGriefing true
CHAIN | CONDITIONAL | ALWAYS ACTIVE
This sets the gamerule back to true.

Please leave a diamond, a favorite or maybe even subscribe! Stay tuned for more!

More like this

  Have something to say?

Welcome