summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2017-01-02 13:51:16 +1100
committermd_5 <git@md-5.net>2017-01-02 13:51:16 +1100
commitbf8303f25d6dade92fa287831f0c4d888635e1a1 (patch)
treeec3ad443272d3918b842561fe3548014a251ce77
parent5715b3a6d98848d39c1e6bc6b0be6ba0ef8e2b76 (diff)
downloadcraftbukkit-bf8303f25d6dade92fa287831f0c4d888635e1a1.tar
craftbukkit-bf8303f25d6dade92fa287831f0c4d888635e1a1.tar.gz
craftbukkit-bf8303f25d6dade92fa287831f0c4d888635e1a1.tar.lz
craftbukkit-bf8303f25d6dade92fa287831f0c4d888635e1a1.tar.xz
craftbukkit-bf8303f25d6dade92fa287831f0c4d888635e1a1.zip
Clear effectsToProccess after applying potion effects
-rw-r--r--nms-patches/EntityLiving.patch37
1 files changed, 19 insertions, 18 deletions
diff --git a/nms-patches/EntityLiving.patch b/nms-patches/EntityLiving.patch
index 7bc21426..9215f46a 100644
--- a/nms-patches/EntityLiving.patch
+++ b/nms-patches/EntityLiving.patch
@@ -160,7 +160,7 @@
try {
while (iterator.hasNext()) {
MobEffectList mobeffectlist = (MobEffectList) iterator.next();
-@@ -483,6 +549,16 @@
+@@ -483,6 +549,17 @@
} catch (ConcurrentModificationException concurrentmodificationexception) {
;
}
@@ -173,11 +173,12 @@
+ removeEffect((MobEffectList) e);
+ }
+ }
++ effectsToProcess.clear();
+ // CraftBukkit end
if (this.updateEffects) {
if (!this.world.isClientSide) {
-@@ -580,6 +656,12 @@
+@@ -580,6 +657,12 @@
}
public void addEffect(MobEffect mobeffect) {
@@ -190,7 +191,7 @@
if (this.d(mobeffect)) {
MobEffect mobeffect1 = (MobEffect) this.effects.get(mobeffect.getMobEffect());
-@@ -612,6 +694,12 @@
+@@ -612,6 +695,12 @@
@Nullable
public MobEffect c(@Nullable MobEffectList mobeffectlist) {
@@ -203,7 +204,7 @@
return (MobEffect) this.effects.remove(mobeffectlist);
}
-@@ -651,20 +739,52 @@
+@@ -651,20 +740,52 @@
}
@@ -257,7 +258,7 @@
this.datawatcher.set(EntityLiving.HEALTH, Float.valueOf(MathHelper.a(f, 0.0F, this.getMaxHealth())));
}
-@@ -680,14 +800,16 @@
+@@ -680,14 +801,16 @@
} else if (damagesource.o() && this.hasEffect(MobEffects.FIRE_RESISTANCE)) {
return false;
} else {
@@ -277,7 +278,7 @@
this.damageShield(f);
f = 0.0F;
if (!damagesource.a()) {
-@@ -706,20 +828,39 @@
+@@ -706,20 +829,39 @@
if ((float) this.noDamageTicks > (float) this.maxNoDamageTicks / 2.0F) {
if (f <= this.lastDamage) {
@@ -319,7 +320,7 @@
this.aA = 0.0F;
Entity entity1 = damagesource.getEntity();
-@@ -806,18 +947,27 @@
+@@ -806,18 +948,27 @@
EnumHand[] aenumhand = EnumHand.values();
int i = aenumhand.length;
@@ -349,7 +350,7 @@
if (this instanceof EntityHuman) {
((EntityHuman) this).b(StatisticList.b(Items.cY));
}
-@@ -914,6 +1064,12 @@
+@@ -914,6 +1065,12 @@
boolean flag = this.lastDamageByPlayerTime > 0;
this.a(flag, i, damagesource);
@@ -362,7 +363,7 @@
}
}
-@@ -1003,8 +1159,13 @@
+@@ -1003,8 +1160,13 @@
int i = MathHelper.f((f - 3.0F - f2) * f1);
if (i > 0) {
@@ -377,7 +378,7 @@
int j = MathHelper.floor(this.locX);
int k = MathHelper.floor(this.locY - 0.20000000298023224D);
int l = MathHelper.floor(this.locZ);
-@@ -1031,7 +1192,7 @@
+@@ -1031,7 +1193,7 @@
protected float applyArmorModifier(DamageSource damagesource, float f) {
if (!damagesource.ignoresArmor()) {
@@ -386,7 +387,7 @@
f = CombatMath.a(f, (float) this.getArmorStrength(), (float) this.getAttributeInstance(GenericAttributes.h).getValue());
}
-@@ -1044,7 +1205,8 @@
+@@ -1044,7 +1206,8 @@
} else {
int i;
@@ -396,7 +397,7 @@
i = (this.getEffect(MobEffects.RESISTANCE).getAmplifier() + 1) * 5;
int j = 25 - i;
float f1 = f * (float) j;
-@@ -1065,22 +1227,129 @@
+@@ -1065,22 +1228,129 @@
}
}
@@ -536,7 +537,7 @@
}
public CombatTracker getCombatTracker() {
-@@ -1147,6 +1416,7 @@
+@@ -1147,6 +1417,7 @@
public AttributeMapBase getAttributeMap() {
if (this.attributeMap == null) {
this.attributeMap = new AttributeMapServer();
@@ -544,7 +545,7 @@
}
return this.attributeMap;
-@@ -1438,6 +1708,7 @@
+@@ -1438,6 +1709,7 @@
}
if (this.onGround && !this.world.isClientSide) {
@@ -552,7 +553,7 @@
this.setFlag(7, false);
}
} else {
-@@ -1798,6 +2069,7 @@
+@@ -1798,6 +2070,7 @@
}
if (!this.world.isClientSide) {
@@ -560,7 +561,7 @@
this.setFlag(7, flag);
}
-@@ -1895,11 +2167,11 @@
+@@ -1895,11 +2168,11 @@
}
public boolean isInteractable() {
@@ -574,7 +575,7 @@
}
protected void ap() {
-@@ -2036,7 +2308,23 @@
+@@ -2036,7 +2309,23 @@
protected void v() {
if (!this.activeItem.isEmpty() && this.isHandRaised()) {
this.a(this.activeItem, 16);
@@ -599,7 +600,7 @@
this.cF();
}
-@@ -2115,10 +2403,18 @@
+@@ -2115,10 +2404,18 @@
}
if (flag1) {