13
0
geforkt von Mirrors/Paper

SPIGOT-6292: LivingEntity.setNoDamageTicks no longer functions

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2020-12-28 08:28:57 +11:00
Ursprung 59490dfe12
Commit 2eda6f0b01

Datei anzeigen

@ -388,9 +388,12 @@
this.damageShield(f);
f2 = f;
f = 0.0F;
@@ -916,20 +1119,39 @@
@@ -914,22 +1117,41 @@
this.av = 1.5F;
boolean flag1 = true;
if ((float) this.noDamageTicks > 10.0F) {
- if ((float) this.noDamageTicks > 10.0F) {
+ if ((float) this.noDamageTicks > (float) this.maxNoDamageTicks / 2.0F) { // CraftBukkit - restore use of maxNoDamageTicks
if (f <= this.lastDamage) {
+ this.forceExplosionKnockback = true; // CraftBukkit - SPIGOT-949 - for vanilla consistency, cooldown does not prevent explosion knockback
return false;
@ -410,8 +413,9 @@
+ return false;
+ }
this.lastDamage = f;
this.noDamageTicks = 20;
- this.noDamageTicks = 20;
- this.damageEntity0(damagesource, f);
+ this.noDamageTicks = this.maxNoDamageTicks; // CraftBukkit - restore use of maxNoDamageTicks
+ // this.damageEntity0(damagesource, f);
+ // CraftBukkit end
this.hurtDuration = 10;