Skip to content

Instantly share code, notes, and snippets.

@Korko
Last active August 29, 2015 14:03
Show Gist options
  • Save Korko/5fbc46ce52e3d5f802a0 to your computer and use it in GitHub Desktop.
Save Korko/5fbc46ce52e3d5f802a0 to your computer and use it in GitHub Desktop.
[Minecraft][Command Blocks][1.7] HydraZombie # Kill one and two will spawn
# CommandBlock order : West, East, Down, Up, North, South
# Only call once
/scoreboard objectives add Hydra dummy
/scoreboard objectives add BabyHydra dummy
# Summon a persistent (never despawning) Zombie
/summon Zombie ~ ~ ~ {CustomName:"HydraZombie",CustomNameVisible:1,Equipment:[{},{},{id:minecraft:carrot,Count:1,tag:{display:{Name:"HydraSource1"}}},{id:minecraft:potato,Count:1,tag:{display:{Name:"HydraSource2"}}},{id:iron_helmet}],DropChances:[0.0f,0.0f,2.0f,2.0f,0.0f],PersistenceRequired:1}
# Around a fast clock (20t/s)
# /fill ~ ~-1 ~ ~ ~-1 ~-1 redstone_block
# /fill ~ ~1 ~ ~ ~1 ~-1 stone
# Detect both custom items dropped by the HydraZombie
/scoreboard players set @e[type=Item] Hydra 1 {Item:{tag:{display:{Name:"HydraSource1"}}}}
/scoreboard players set @e[type=Item] Hydra 2 {Item:{tag:{display:{Name:"HydraSource2"}}}}
# Spawn a persistent HydraZombie on one of the items dropped
/execute @e[type=Item,score_Hydra_min=2] ~ ~ ~ /summon Zombie ~ ~ ~ {IsBaby:1,Attributes:[{Name:generic.movementSpeed,Base:0.0}],CustomName:"BabyHydraZombie ",CustomNameVisible:1,Equipment:[{},{},{},{},{id:iron_helmet}],DropChances:[0.0f,0.0f,0.0f,0.0f,0.0f],PersistenceRequired:1}
# Spawn a non-persistent HydraZombie on the other item dropped
/execute @e[type=Item,score_Hydra=1] ~ ~ ~ /summon Zombie ~ ~ ~ {IsBaby:1,Attributes:[{Name:generic.movementSpeed,Base:0.0}],CustomName:"BabyHydraZombie",CustomNameVisible:1,Equipment:[{},{},{},{},{id:iron_helmet}],DropChances:[0.0f,0.0f,0.0f,0.0f,0.0f]}
# Detect the persistent BabyHydraZombie
/scoreboard players set @e[type=Zombie] Hydra 1 {CustomName:"BabyHydraZombie "}
# Kill the items spawning HydraZombie
/kill @e[type=Item,score_Hydra_min=1]
# Compute BabyHydraZombie age (+20/s)
/scoreboard players add @e[type=Zombie] BabyHydra 1 {CustomName:"BabyHydraZombie"}
/scoreboard players add @e[type=Zombie] BabyHydra 1 {CustomName:"BabyHydraZombie "}
# Spawn a persitent HydraZombie where the persistent BabyHydraZombie is
/execute @e[type=Zombie,score_BabyHydra_min=40,score_Hydra_min=1] ~ ~ ~ /summon Zombie ~ ~ ~ {CustomName:"HydraZombie",CustomNameVisible:1,Equipment:[{},{},{id:minecraft:carrot,Count:1,tag:{display:{Name:"HydraSource1"}}},{id:minecraft:potato,Count:1,tag:{display:{Name:"HydraSource2"}}},{id:iron_helmet}],DropChances:[0.0f,0.0f,2.0f,2.0f,0.0f],PersistenceRequired:1}
# Kill the persistent BabyHydraZombie
/tp @e[type=Zombie,score_BabyHydra_min=40,score_Hydra_min=1] ~ ~-300 ~
# Spawn a non-persistent HydraZombie where the non persistent BabyHydraZombie is
/execute @e[type=Zombie,score_BabyHydra_min=40] ~ ~ ~ /summon Zombie ~ ~ ~ {CustomName:"HydraZombie",CustomNameVisible:1,Equipment:[{},{},{id:minecraft:carrot,Count:1,tag:{display:{Name:"HydraSource1"}}},{id:minecraft:potato,Count:1,tag:{display:{Name:"HydraSource2"}}},{id:iron_helmet}],DropChances:[0.0f,0.0f,2.0f,2.0f,0.0f]}
# Kill the non-persistent BabyHydraZombie
/tp @e[type=Zombie,score_BabyHydra_min=40] ~ ~-300 ~
--- or in 1 command ---
/summon FallingSand ~ ~1 ~ {Block:redstone_block,Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:/fill ~ ~0 ~1 ~ ~-21 ~1 redstone_block},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~ ~3 ~1 stone},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~ ~4 ~ command_block 0 replace {Command:fill ~ ~2 ~ ~ ~-25 ~1 air}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:/summon Zombie ~ ~ ~ {CustomName:"HydraZombie",CustomNameVisible:1,Equipment:[{},{},{id:minecraft:carrot,Count:1,tag:{display:{Name:"HydraSource1"}}},{id:minecraft:potato,Count:1,tag:{display:{Name:"HydraSource2"}}},{id:iron_helmet}],DropChances:[0.0f,0.0f,2.0f,2.0f,0.0f],PersistenceRequired:1}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:/scoreboard objectives add BabyHydra dummy},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:/scoreboard objectives add Hydra dummy},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~3 ~-15 ~-1 command_block 0 replace {Command:/scoreboard players set @e[type=Item] Hydra 1 {Item:{tag:{display:{Name:"HydraSource1"}}}}}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~3 ~-14 ~1 command_block 0 replace {Command:/scoreboard players set @e[type=Item] Hydra 2 {Item:{tag:{display:{Name:"HydraSource2"}}}}}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~4 ~-13 ~-1 command_block 0 replace {Command:/execute @e[type=Item,score_Hydra_min=2] ~ ~ ~ /summon Zombie ~ ~ ~ {IsBaby:1,Attributes:[{Name:generic.movementSpeed,Base:0.0}],CustomName:"BabyHydraZombie ",CustomNameVisible:1,Equipment:[{},{},{},{},{id:iron_helmet}],DropChances:[0.0f,0.0f,0.0f,0.0f,0.0f],PersistenceRequired:1}}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~4 ~-12 ~1 command_block 0 replace {Command:/execute @e[type=Item,score_Hydra=1] ~ ~ ~ /summon Zombie ~ ~ ~ {IsBaby:1,Attributes:[{Name:generic.movementSpeed,Base:0.0}],CustomName:"BabyHydraZombie",CustomNameVisible:1,Equipment:[{},{},{},{},{id:iron_helmet}],DropChances:[0.0f,0.0f,0.0f,0.0f,0.0f]}}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~5 ~-11 ~-1 command_block 0 replace {Command:/scoreboard players set @e[type=Zombie] Hydra 1 {CustomName:"BabyHydraZombie "}}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~5 ~-10 ~1 command_block 0 replace {Command:/kill @e[type=Item,score_Hydra_min=1]}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~6 ~-9 ~-1 command_block 0 replace {Command:/scoreboard players add @e[type=Zombie] BabyHydra 1 {CustomName:"BabyHydraZombie"}}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~6 ~-8 ~1 command_block 0 replace {Command:/scoreboard players add @e[type=Zombie] BabyHydra 1 {CustomName:"BabyHydraZombie "}}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~7 ~-7 ~-1 command_block 0 replace {Command:/execute @e[type=Zombie,score_BabyHydra_min=40,score_Hydra_min=1] ~ ~ ~ /summon Zombie ~ ~ ~ {CustomName:"HydraZombie",CustomNameVisible:1,Equipment:[{},{},{id:minecraft:carrot,Count:1,tag:{display:{Name:"HydraSource1"}}},{id:minecraft:potato,Count:1,tag:{display:{Name:"HydraSource2"}}},{id:iron_helmet}],DropChances:[0.0f,0.0f,2.0f,2.0f,0.0f],PersistenceRequired:1}}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~7 ~-6 ~1 command_block 0 replace {Command:/tp @e[type=Zombie,score_BabyHydra_min=40,score_Hydra_min=1] ~ ~-300 ~}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~8 ~-5 ~-1 command_block 0 replace {Command:/execute @e[type=Zombie,score_BabyHydra_min=40] ~ ~ ~ /summon Zombie ~ ~ ~ {CustomName:"HydraZombie",CustomNameVisible:1,Equipment:[{},{},{id:minecraft:carrot,Count:1,tag:{display:{Name:"HydraSource1"}}},{id:minecraft:potato,Count:1,tag:{display:{Name:"HydraSource2"}}},{id:iron_helmet}],DropChances:[0.0f,0.0f,2.0f,2.0f,0.0f]}}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~8 ~-4 ~1 command_block 0 replace {Command:/tp @e[type=Zombie,score_BabyHydra_min=40] ~ ~-300 ~}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:gamerule commandBlockOutput false},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:"fill ~2 ~-2 ~ ~8 ~-2 ~ redstone_block"},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:"setblock ~2 ~-1 ~-1 command_block 0 replace {Command:/fill ~ ~ ~1 ~7 ~ ~1 stone 0 replace redstone_block}"},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:"setblock ~2 ~ ~1 command_block 0 replace {Command:/fill ~ ~ ~-1 ~7 ~ ~-1 redstone_block 0 replace stone}"},Time:1,Riding:{id:"FallingSand",Block:stone,Time:1}}}}}}}}}}}}}}}}}}}}}}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment