/summon MushroomCow ~ ~ ~ {ActiveEffects:[{id:14,Duration:100000,Amplifier:1,HideParticles:1}],Riding:{id:"Spider",Attributes:[{Name:"generic.maxHealth",Base:10000}],Riding:{id:"Villager",Attributes:[{Name:"generic.maxHealth",Base:10000}],Riding:{id:"Spider",Attributes:[{Name:"generic.maxHealth",Base:10000}],Riding:{id:"Bat",Attributes:[{Name:"generic.maxHealth",Base:10000}]}}}}}
Explanation:
I used a spider to separate the mobs in the end as it's exactly 1 block tall. It is invulnerable to suffocation (because it has like 10000 health).
Also, all mobs have 10000 health, so even when they are stuck in a block because of the bat, they don't die. Change health by changing the number of baseHealth
in this section: Attributes:[{Name:"generic.maxHealth",Base:<HP>}]
To kill the whole stack, first off, you have to make sure all commands blocks are activated at the very same time -- exact same time, or it may result in idling totems of mob towers. Then type in the command /kill @e[type=Bat,c=1,r=<size of the field>]
in command block A
, /kill @e[type=Villager,c=1,r=<size of the field>]
in B
, /kill @e[type=Mooshroom,c=1,r=<size of the field>]
in C
and /kill @e[type=Spider,c=2,r=<size of the field>]
in D
. Then you should be able to kill the whole stack.
I don't have a computer now so I cannot check the code, but feel free to tell me if it worked or not. Thanks!
You'll need to use two commands; one to set the foot part, one to set the head part. To setblock the head part of the bed, add 8 to the dataValue you used for the foot part.
For example, these two commands will create a bed facing north:
/setblock 0 64 0 bed 0
/setblock 0 64 1 bed 8
Or these two for a bed facing east:
/setblock 0 64 0 bed 3
/setblock 1 64 0 bed 11
Best Answer
This answer will show you how to summon the TNT when you kill another player.
Begin by creating the objective
playerkill
to detect when a player kills another player:Next, create a repeat command block (set to 'always active') and a chain command block, containing these commands:
These will check every tick whether or not a player has killed another player, and summons a primed TNT below their feet if they have. Then it resets the player killer's score to zero, so the player isn't constantly killed.
Demonstration: (note I have manually set my score to 1, since I do not have another player to
murdertest with)