How to spawn a Giant with equipment?

Solution 1:

Explanation

All mobs have the HandItems and ArmorItems tags. The syntax for HandItems is this:

HandItems:[{<item in mainhand>},{<item in offhand>}]

You can provide the id, enchantments, name, etc. Here is the ArmorItems syntax:

ArmorItems:[{<boots>},{<leggings>},{<chestplate>},{<helmet>}]

Like HandItems, you can supply enchantments and names and ids. Here's a command that will spawn a Giant zombie with a diamond sword and a full set of diamond armor:

/summon Giant ~ ~ ~ {HandItems:[{id:"minecraft:diamond_sword",Count:1b}],ArmorItems:[{id:minecraft:diamond_boots",Count:1b},{id:"minecraft:diamond_leggings",Count:1b},{id:"minecraft:diamond_chestplate",Count:1b},{id:"minecraft:diamond_helmet",Count:1b}]}

However, keep in mind that Giants have no AI as of 1.8. The Giant will do nothing but stand there (making it great for a statue). But battle will not work very well without custom AI. I have a supplied a some basic commands that will make the Giant able to be fought.

Prerequisites

/summon Zombie ~ ~ ~ {CustomName:"AiZombie",Silent:1,HandItems:[{id:minecraft:diamond_sword,Count:1b}],ActiveEffects:[{id:14,Amplifier:1,Duration:10000}]}

/summon Giant ~ ~ ~ {CustomName:"BattleGiant",HandItems:[{id:minecraft:diamond_sword,Count:1b}],ArmorItems:[{id:minecraft:diamond_boots,Count:1b},{id:minecraft:diamond_leggings,Count:1b},{id:minecraft:diamond_chestplate,Count:1b},{id:minecraft:diamond_helmet,Count:1b}]}

/scoreboard objectives add giantAlive dummy

/scoreboard objectives set @e[type=Zombie,name=AiZombie] giantAlive 1

Run on a Clock

/tp @e[type=Giant,name=BattleGiant] @e[type=Zombie,name=AiZombie]

/testfor @e[type=Giant,name=BattleGiant]

Hook this one up to a comparator, which is hooked up to a NOT gate, which is hooked up to this next command (this command is not on a clock):

/scoreboard objectives set @e[type=Zombie,name=AiZombie] giantAlive 0

Lastly, this one is repeating:

/tp @e[type=Zombie,name=AiZombie,score_giantAlive=0] ~ -64 ~

What does it do?

The Giant will have zombie AI. Killing the Giant will kill the zombie that guides it. The zombie that the Giant obeys (basically it's master) is invisible and silent.

Giant's Statistics

All Giants have 100 health, half that of an Ender Dragon and equal to an iron golem's.