Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 04:20:08 +01:00
Clear effectsToProccess after applying potion effects
Dieser Commit ist enthalten in:
Ursprung
5715b3a6d9
Commit
bf8303f25d
@ -160,7 +160,7 @@
|
|||||||
try {
|
try {
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
MobEffectList mobeffectlist = (MobEffectList) iterator.next();
|
MobEffectList mobeffectlist = (MobEffectList) iterator.next();
|
||||||
@@ -483,6 +549,16 @@
|
@@ -483,6 +549,17 @@
|
||||||
} catch (ConcurrentModificationException concurrentmodificationexception) {
|
} catch (ConcurrentModificationException concurrentmodificationexception) {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@ -173,11 +173,12 @@
|
|||||||
+ removeEffect((MobEffectList) e);
|
+ removeEffect((MobEffectList) e);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
+ effectsToProcess.clear();
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
|
|
||||||
if (this.updateEffects) {
|
if (this.updateEffects) {
|
||||||
if (!this.world.isClientSide) {
|
if (!this.world.isClientSide) {
|
||||||
@@ -580,6 +656,12 @@
|
@@ -580,6 +657,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addEffect(MobEffect mobeffect) {
|
public void addEffect(MobEffect mobeffect) {
|
||||||
@ -190,7 +191,7 @@
|
|||||||
if (this.d(mobeffect)) {
|
if (this.d(mobeffect)) {
|
||||||
MobEffect mobeffect1 = (MobEffect) this.effects.get(mobeffect.getMobEffect());
|
MobEffect mobeffect1 = (MobEffect) this.effects.get(mobeffect.getMobEffect());
|
||||||
|
|
||||||
@@ -612,6 +694,12 @@
|
@@ -612,6 +695,12 @@
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public MobEffect c(@Nullable MobEffectList mobeffectlist) {
|
public MobEffect c(@Nullable MobEffectList mobeffectlist) {
|
||||||
@ -203,7 +204,7 @@
|
|||||||
return (MobEffect) this.effects.remove(mobeffectlist);
|
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())));
|
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)) {
|
} else if (damagesource.o() && this.hasEffect(MobEffects.FIRE_RESISTANCE)) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
@ -277,7 +278,7 @@
|
|||||||
this.damageShield(f);
|
this.damageShield(f);
|
||||||
f = 0.0F;
|
f = 0.0F;
|
||||||
if (!damagesource.a()) {
|
if (!damagesource.a()) {
|
||||||
@@ -706,20 +828,39 @@
|
@@ -706,20 +829,39 @@
|
||||||
|
|
||||||
if ((float) this.noDamageTicks > (float) this.maxNoDamageTicks / 2.0F) {
|
if ((float) this.noDamageTicks > (float) this.maxNoDamageTicks / 2.0F) {
|
||||||
if (f <= this.lastDamage) {
|
if (f <= this.lastDamage) {
|
||||||
@ -319,7 +320,7 @@
|
|||||||
this.aA = 0.0F;
|
this.aA = 0.0F;
|
||||||
Entity entity1 = damagesource.getEntity();
|
Entity entity1 = damagesource.getEntity();
|
||||||
|
|
||||||
@@ -806,18 +947,27 @@
|
@@ -806,18 +948,27 @@
|
||||||
EnumHand[] aenumhand = EnumHand.values();
|
EnumHand[] aenumhand = EnumHand.values();
|
||||||
int i = aenumhand.length;
|
int i = aenumhand.length;
|
||||||
|
|
||||||
@ -349,7 +350,7 @@
|
|||||||
if (this instanceof EntityHuman) {
|
if (this instanceof EntityHuman) {
|
||||||
((EntityHuman) this).b(StatisticList.b(Items.cY));
|
((EntityHuman) this).b(StatisticList.b(Items.cY));
|
||||||
}
|
}
|
||||||
@@ -914,6 +1064,12 @@
|
@@ -914,6 +1065,12 @@
|
||||||
boolean flag = this.lastDamageByPlayerTime > 0;
|
boolean flag = this.lastDamageByPlayerTime > 0;
|
||||||
|
|
||||||
this.a(flag, i, damagesource);
|
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);
|
int i = MathHelper.f((f - 3.0F - f2) * f1);
|
||||||
|
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
@ -377,7 +378,7 @@
|
|||||||
int j = MathHelper.floor(this.locX);
|
int j = MathHelper.floor(this.locX);
|
||||||
int k = MathHelper.floor(this.locY - 0.20000000298023224D);
|
int k = MathHelper.floor(this.locY - 0.20000000298023224D);
|
||||||
int l = MathHelper.floor(this.locZ);
|
int l = MathHelper.floor(this.locZ);
|
||||||
@@ -1031,7 +1192,7 @@
|
@@ -1031,7 +1193,7 @@
|
||||||
|
|
||||||
protected float applyArmorModifier(DamageSource damagesource, float f) {
|
protected float applyArmorModifier(DamageSource damagesource, float f) {
|
||||||
if (!damagesource.ignoresArmor()) {
|
if (!damagesource.ignoresArmor()) {
|
||||||
@ -386,7 +387,7 @@
|
|||||||
f = CombatMath.a(f, (float) this.getArmorStrength(), (float) this.getAttributeInstance(GenericAttributes.h).getValue());
|
f = CombatMath.a(f, (float) this.getArmorStrength(), (float) this.getAttributeInstance(GenericAttributes.h).getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1044,7 +1205,8 @@
|
@@ -1044,7 +1206,8 @@
|
||||||
} else {
|
} else {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -396,7 +397,7 @@
|
|||||||
i = (this.getEffect(MobEffects.RESISTANCE).getAmplifier() + 1) * 5;
|
i = (this.getEffect(MobEffects.RESISTANCE).getAmplifier() + 1) * 5;
|
||||||
int j = 25 - i;
|
int j = 25 - i;
|
||||||
float f1 = f * (float) j;
|
float f1 = f * (float) j;
|
||||||
@@ -1065,22 +1227,129 @@
|
@@ -1065,22 +1228,129 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -536,7 +537,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public CombatTracker getCombatTracker() {
|
public CombatTracker getCombatTracker() {
|
||||||
@@ -1147,6 +1416,7 @@
|
@@ -1147,6 +1417,7 @@
|
||||||
public AttributeMapBase getAttributeMap() {
|
public AttributeMapBase getAttributeMap() {
|
||||||
if (this.attributeMap == null) {
|
if (this.attributeMap == null) {
|
||||||
this.attributeMap = new AttributeMapServer();
|
this.attributeMap = new AttributeMapServer();
|
||||||
@ -544,7 +545,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
return this.attributeMap;
|
return this.attributeMap;
|
||||||
@@ -1438,6 +1708,7 @@
|
@@ -1438,6 +1709,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.onGround && !this.world.isClientSide) {
|
if (this.onGround && !this.world.isClientSide) {
|
||||||
@ -552,7 +553,7 @@
|
|||||||
this.setFlag(7, false);
|
this.setFlag(7, false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -1798,6 +2069,7 @@
|
@@ -1798,6 +2070,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.world.isClientSide) {
|
if (!this.world.isClientSide) {
|
||||||
@ -560,7 +561,7 @@
|
|||||||
this.setFlag(7, flag);
|
this.setFlag(7, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1895,11 +2167,11 @@
|
@@ -1895,11 +2168,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isInteractable() {
|
public boolean isInteractable() {
|
||||||
@ -574,7 +575,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void ap() {
|
protected void ap() {
|
||||||
@@ -2036,7 +2308,23 @@
|
@@ -2036,7 +2309,23 @@
|
||||||
protected void v() {
|
protected void v() {
|
||||||
if (!this.activeItem.isEmpty() && this.isHandRaised()) {
|
if (!this.activeItem.isEmpty() && this.isHandRaised()) {
|
||||||
this.a(this.activeItem, 16);
|
this.a(this.activeItem, 16);
|
||||||
@ -599,7 +600,7 @@
|
|||||||
this.cF();
|
this.cF();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2115,10 +2403,18 @@
|
@@ -2115,10 +2404,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag1) {
|
if (flag1) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren