SPIGOT-949: Fix damage cooldown reducing explosion knockback
By: Jedediah Smith <jedediah@silencegreys.com>
This commit is contained in:
@@ -275,7 +275,11 @@
|
||||
this.getEquipment(4).damage((int) (f * 4.0F + this.random.nextFloat() * f * 2.0F), this);
|
||||
f *= 0.75F;
|
||||
}
|
||||
@@ -606,16 +719,34 @@
|
||||
@@ -603,19 +716,38 @@
|
||||
|
||||
if ((float) this.noDamageTicks > (float) this.maxNoDamageTicks / 2.0F) {
|
||||
if (f <= this.lastDamage) {
|
||||
+ this.forceExplosionKnockback = true; // CraftBukkit - SPIGOT-949 - for vanilla consistency, cooldown does not prevent explosion knockback
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -312,7 +316,7 @@
|
||||
this.aw = 0.0F;
|
||||
Entity entity = damagesource.getEntity();
|
||||
|
||||
@@ -721,11 +852,19 @@
|
||||
@@ -721,11 +853,19 @@
|
||||
}
|
||||
|
||||
if (this.ba() && this.world.getGameRules().getBoolean("doMobLoot")) {
|
||||
@@ -332,7 +336,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -785,8 +924,13 @@
|
||||
@@ -785,8 +925,13 @@
|
||||
int i = MathHelper.f((f - 3.0F - f2) * f1);
|
||||
|
||||
if (i > 0) {
|
||||
@@ -347,7 +351,7 @@
|
||||
int j = MathHelper.floor(this.locX);
|
||||
int k = MathHelper.floor(this.locY - 0.20000000298023224D);
|
||||
int l = MathHelper.floor(this.locZ);
|
||||
@@ -830,7 +974,7 @@
|
||||
@@ -830,7 +975,7 @@
|
||||
int i = 25 - this.br();
|
||||
float f1 = f * (float) i;
|
||||
|
||||
@@ -356,7 +360,7 @@
|
||||
f = f1 / 25.0F;
|
||||
}
|
||||
|
||||
@@ -844,8 +988,9 @@
|
||||
@@ -844,8 +989,9 @@
|
||||
int i;
|
||||
int j;
|
||||
float f1;
|
||||
@@ -368,7 +372,7 @@
|
||||
i = (this.getEffect(MobEffectList.RESISTANCE).getAmplifier() + 1) * 5;
|
||||
j = 25 - i;
|
||||
f1 = f * (float) j;
|
||||
@@ -871,22 +1016,121 @@
|
||||
@@ -871,22 +1017,121 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -497,7 +501,7 @@
|
||||
}
|
||||
|
||||
public CombatTracker bs() {
|
||||
@@ -1240,7 +1484,8 @@
|
||||
@@ -1240,7 +1485,8 @@
|
||||
if (f > 0.0025000002F) {
|
||||
f3 = 1.0F;
|
||||
f2 = (float) Math.sqrt((double) f) * 3.0F;
|
||||
@@ -507,7 +511,7 @@
|
||||
}
|
||||
|
||||
if (this.az > 0.0F) {
|
||||
@@ -1413,6 +1658,13 @@
|
||||
@@ -1413,6 +1659,13 @@
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
Entity entity = (Entity) list.get(i);
|
||||
|
||||
@@ -521,7 +525,7 @@
|
||||
this.s(entity);
|
||||
}
|
||||
}
|
||||
@@ -1425,6 +1677,18 @@
|
||||
@@ -1425,6 +1678,18 @@
|
||||
|
||||
public void mount(Entity entity) {
|
||||
if (this.vehicle != null && entity == null) {
|
||||
|
||||
Reference in New Issue
Block a user