summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-03-26 14:10:29 +1100
committermd_5 <git@md-5.net>2016-03-26 14:12:35 +1100
commit6bf25cde7ecbaeb89bdfe18e7971669cec668646 (patch)
treea5d9bf9ef2d703296eff9e095133d12ec4509cbe /nms-patches
parent95548945533d8572a7cb911b33c8ef4a823be49b (diff)
downloadcraftbukkit-6bf25cde7ecbaeb89bdfe18e7971669cec668646.tar
craftbukkit-6bf25cde7ecbaeb89bdfe18e7971669cec668646.tar.gz
craftbukkit-6bf25cde7ecbaeb89bdfe18e7971669cec668646.tar.lz
craftbukkit-6bf25cde7ecbaeb89bdfe18e7971669cec668646.tar.xz
craftbukkit-6bf25cde7ecbaeb89bdfe18e7971669cec668646.zip
SPIGOT-2034: Rework damage again, this time for snowballs.
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/EntityLiving.patch19
1 files changed, 10 insertions, 9 deletions
diff --git a/nms-patches/EntityLiving.patch b/nms-patches/EntityLiving.patch
index 974563a1..a4ed72b2 100644
--- a/nms-patches/EntityLiving.patch
+++ b/nms-patches/EntityLiving.patch
@@ -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);