How to make zombies/skeletons not burn in sunlight without changing their looks?

It's for an survival map I'm making that I promised to my friends would come out soon.

I have tried this:

/summon Zombie ~ ~ ~ {Equipment:[{},{},{},{},{minecraft:zombie_head}]}

but it still catches on fire!


Solution 1:

You've got the right idea, but minecraft:zombie_head doesn't exist as a distinct item. It's just called minecraft:skull with a damage value of 2.

So the correct command becomes the following:

/summon Zombie ~ ~ ~ {Equipment:[{},{},{},{},{id:skull,Damage:2}]}

Solution 2:

Try putting a mushroom on their head:

/summon Zombie ~ ~1 ~ {ArmorItems:[{},{},{},{id:musroom}],CustomName:now not burn,CustomNameVisible:1,ActiveEffects:[{Id:14,Amplifier:1,Duration:999999,ShowParticles:0b}],IsBaby:1}