mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 19:28:03 +01:00
SPIGOT-6292: LivingEntity.setNoDamageTicks no longer functions
By: md_5 <git@md-5.net>
This commit is contained in:
parent
59490dfe12
commit
2eda6f0b01
1 changed files with 7 additions and 3 deletions
|
@ -388,9 +388,12 @@
|
||||||
this.damageShield(f);
|
this.damageShield(f);
|
||||||
f2 = f;
|
f2 = f;
|
||||||
f = 0.0F;
|
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) {
|
if (f <= this.lastDamage) {
|
||||||
+ this.forceExplosionKnockback = true; // CraftBukkit - SPIGOT-949 - for vanilla consistency, cooldown does not prevent explosion knockback
|
+ this.forceExplosionKnockback = true; // CraftBukkit - SPIGOT-949 - for vanilla consistency, cooldown does not prevent explosion knockback
|
||||||
return false;
|
return false;
|
||||||
|
@ -410,8 +413,9 @@
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
this.lastDamage = f;
|
this.lastDamage = f;
|
||||||
this.noDamageTicks = 20;
|
- this.noDamageTicks = 20;
|
||||||
- this.damageEntity0(damagesource, f);
|
- this.damageEntity0(damagesource, f);
|
||||||
|
+ this.noDamageTicks = this.maxNoDamageTicks; // CraftBukkit - restore use of maxNoDamageTicks
|
||||||
+ // this.damageEntity0(damagesource, f);
|
+ // this.damageEntity0(damagesource, f);
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
this.hurtDuration = 10;
|
this.hurtDuration = 10;
|
||||||
|
|
Loading…
Add table
Reference in a new issue