this will give you a custom pet in mnecraft! thanks to mr.crayfish for this tutorial!
1.copy the command below(in command block).change the WOLF_PET_X to WOLF_PET_1.
2.place an armor stand and go close very close to it.copy the command(in chat) and change PET_X to PET_1.
3.place a command block and go to http://minecraft-heads.com/custom/heads/animals to select the custom head for your pet.paste the command in to the block
and place the head it gives you on the now invisible armor stand.
4.place a command block and set it on repeat and always active.copy the command into it.change both X's to 1.*
5.place another command block leading out of the other one and make it chain,conditional and always active.paste the command into it.change the X to 1.*
*if you have a Mac computer, don't write the custom names of the armor stand/wolf but write armor_stand instead of PET_1 and wolf instead of WOLF_PET_1 in the
command blocks.
1./summon wolf ~ ~ ~ {CustomName:WOLF_PET_X,Attributes:[{Name:generic.maxHealth,Base:80}],Health:80.0f,Silent:1,ActiveEffects:[{Id:14,Amplifier:100,Duration:200000000,ShowParticles:0b}]}
2./entitydata @e[type=armor_stand,r=1] {CustomName:PET_X,Invisible:1b}
4./tp @e[name=PET_X] @e[name=WOLF_PET_X]
5./tp @e[name=PET_X] ~ ~-1.4 ~
had to put commands in description due to you can't copy specific things in the command box