mojira.dev
MC-13330

Mob armor percentage likely error

Zombies and skeletons have a percent chance of wearing armor on higher difficulties, but the odds do not increase as expected. Currently they will have a 0% chance on easy, 5% chance on normal, and a 2% chance on hard. I don't know what it's intended to be, but it seems unlikely that it was meant to go up and then down.

Compare this with the following difficulty changes (easy, normal, hard):
Weapon enchantment probability: 0%, 10%, 20%
Armor enchantment probability: 0%, 25%, 50%
Pick up loot probability: 10%, 15%, 45%
Probability of additional armor pieces: 75%, 75%, 90%
Equipment enchantment levels: 5-10, 5-15, 5-20
Odds of a zombie carrying a shovel or sword: 1%, 1%, 5%

This would be super easy to fix, just one number in one file needs to be changed.

Comments 6

Unable to reproduce. After testing by spawning many zombies in different difficulties, I can clearly see an increase of armour bearers between normal and hard.

Same, unable to reproduce, on Hard, more mobs seem to have more armor on them.

But plausible:

EntityLiving.java

/** Probability to get armor */
private static final float[] armorProbability = new float[] {0.0F, 0.0F, 0.05F, 0.02F};
...
if (this.rand.nextFloat() < armorProbability[this.worldObj.difficultySetting])
...

My report was based on the code in EntityLiving.java, the same code that Kumasasa posted. When it comes to empirically testing this, I urge you to be careful with how you interpret your observations. 2% and 5% are relatively small percentages that are close together. To confidently confirm those numbers through in game tests, you would need a large sample size and rigorously recorded results.

I personally ran a test spawning 100 zombies on both Normal and Hard. On Normal, I observed 4 zombies with armor, and on Hard, I observed 2. 100 is hardly a large enough sample to definitively make a conclusion either way, but what you can safely conclude from that is that the odds are close, and not a "clear increase".

Again, just to make sure you're watching for the right thing, I'm not talking about whether they're wielding a weapon or not, or how much armor a particular mob is wearing. They could be wearing 1 piece or all 4, the random percentage in question is how many are wearing any armor vs. none.

So CubeTheThird and Joss Eden, I encourage you to test it again, in larger numbers, and to write down what you see.

I tried it out with about 100 Zombies, both on Normal and Hard. On Normal, I saw only three Zombies with armor on, so reset to Peaceful and switched to Hard, and spawned another group. This time I only saw two Zombies with armor, so I guess ya onto something here.

It seems 1.6 totally revamped this part of the code, so it's no longer and issue.

B R

(Unassigned)

Plausible

difficulty, mob

Minecraft 1.4.7, Minecraft 1.5, Minecraft 1.5.1

Minecraft 1.6.1

Retrieved