Commits

md_5 authored a625e4567d9
SPIGOT-2427: Fix missed diff in armor damage handling
No tags

nms-patches/EntityLiving.patch

Modified
338 338 + if (!this.damageEntity(DamageSource.FALL, (float) i)) {
339 339 + return;
340 340 + }
341 341 + // CraftBukkit end
342 342 this.a(this.e(i), 1.0F, 1.0F);
343 343 - this.damageEntity(DamageSource.FALL, (float) i);
344 344 + // this.damageEntity(DamageSource.FALL, (float) i); // CraftBukkit - moved up
345 345 int j = MathHelper.floor(this.locX);
346 346 int k = MathHelper.floor(this.locY - 0.20000000298023224D);
347 347 int l = MathHelper.floor(this.locZ);
348 -@@ -972,8 +1122,8 @@
348 +@@ -972,7 +1122,7 @@
349 349
350 350 protected float applyArmorModifier(DamageSource damagesource, float f) {
351 351 if (!damagesource.ignoresArmor()) {
352 352 - this.damageArmor(f);
353 -- f = CombatMath.a(f, (float) this.getArmorStrength(), (float) this.getAttributeInstance(GenericAttributes.h).getValue());
354 353 + // this.damageArmor(f); // CraftBukkit - Moved into damageEntity0(DamageSource, float)
355 -+ f = CombatMath.a(f, (float) this.getArmorStrength());
354 + f = CombatMath.a(f, (float) this.getArmorStrength(), (float) this.getAttributeInstance(GenericAttributes.h).getValue());
356 355 }
357 356
358 - return f;
359 357 @@ -985,7 +1135,8 @@
360 358 } else {
361 359 int i;
362 360
363 361 - if (this.hasEffect(MobEffects.RESISTANCE) && damagesource != DamageSource.OUT_OF_WORLD) {
364 362 + // CraftBukkit - Moved to damageEntity0(DamageSource, float)
365 363 + if (false && this.hasEffect(MobEffects.RESISTANCE) && damagesource != DamageSource.OUT_OF_WORLD) {
366 364 i = (this.getEffect(MobEffects.RESISTANCE).getAmplifier() + 1) * 5;
367 365 int j = 25 - i;
368 366 float f1 = f * (float) j;

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut