mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 03:32:46 +01:00
SPIGOT-2034: Rework damage again, this time for snowballs.
This commit is contained in:
parent
9554894553
commit
6bf25cde7e
1 changed files with 10 additions and 9 deletions
|
@ -365,7 +365,7 @@
|
|||
i = (this.getEffect(MobEffects.RESISTANCE).getAmplifier() + 1) * 5;
|
||||
int j = 25 - i;
|
||||
float f1 = f * (float) j;
|
||||
@@ -974,22 +1122,126 @@
|
||||
@@ -974,22 +1122,127 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -470,6 +470,9 @@
|
|||
+ if (damagesource.i() instanceof EntityLiving) {// PAIL: rename
|
||||
+ ((EntityLiving) damagesource.i()).a(EntityLiving.this, 0.5F, EntityLiving.this.locX - damagesource.i().locX, EntityLiving.this.locZ - damagesource.i().locZ);
|
||||
+ }
|
||||
+ if (f <= 0) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ absorptionModifier = (float) -event.getDamage(DamageModifier.ABSORPTION);
|
||||
|
@ -493,16 +496,14 @@
|
|||
+ this.setAbsorptionHearts(this.getAbsorptionHearts() - f);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+ return true;
|
||||
+ } else {
|
||||
+ return false;
|
||||
}
|
||||
+ return true;
|
||||
}
|
||||
+ return false; // CraftBukkit
|
||||
}
|
||||
|
||||
public CombatTracker getCombatTracker() {
|
||||
@@ -1055,6 +1307,7 @@
|
||||
@@ -1055,6 +1308,7 @@
|
||||
public AttributeMapBase getAttributeMap() {
|
||||
if (this.bp == null) {
|
||||
this.bp = new AttributeMapServer();
|
||||
|
@ -510,7 +511,7 @@
|
|||
}
|
||||
|
||||
return this.bp;
|
||||
@@ -1329,6 +1582,7 @@
|
||||
@@ -1329,6 +1583,7 @@
|
||||
}
|
||||
|
||||
if (this.onGround && !this.world.isClientSide) {
|
||||
|
@ -518,7 +519,7 @@
|
|||
this.setFlag(7, false);
|
||||
}
|
||||
} else {
|
||||
@@ -1689,6 +1943,7 @@
|
||||
@@ -1689,6 +1944,7 @@
|
||||
}
|
||||
|
||||
if (!this.world.isClientSide) {
|
||||
|
@ -526,7 +527,7 @@
|
|||
this.setFlag(7, flag);
|
||||
}
|
||||
|
||||
@@ -1702,6 +1957,13 @@
|
||||
@@ -1702,6 +1958,13 @@
|
||||
if (!list.isEmpty()) {
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
Entity entity = (Entity) list.get(i);
|
||||
|
@ -540,7 +541,7 @@
|
|||
|
||||
this.C(entity);
|
||||
}
|
||||
@@ -1918,7 +2180,22 @@
|
||||
@@ -1918,7 +2181,22 @@
|
||||
protected void v() {
|
||||
if (this.bm != null && this.cs()) {
|
||||
this.a(this.bm, 16);
|
||||
|
|
Loading…
Reference in a new issue