Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-17 20:10:10 +01:00
SPIGOT-4684: Update persistence of converting zombie villagers
Dieser Commit ist enthalten in:
Ursprung
f40143ef5e
Commit
812f66aa99
@ -34,20 +34,21 @@
|
|||||||
|
|
||||||
this.conversionTime -= i;
|
this.conversionTime -= i;
|
||||||
if (this.conversionTime <= 0) {
|
if (this.conversionTime <= 0) {
|
||||||
@@ -100,8 +110,10 @@
|
@@ -100,8 +110,11 @@
|
||||||
this.bD = uuid;
|
this.bD = uuid;
|
||||||
this.conversionTime = i;
|
this.conversionTime = i;
|
||||||
this.getDataWatcher().set(EntityZombieVillager.CONVERTING, true);
|
this.getDataWatcher().set(EntityZombieVillager.CONVERTING, true);
|
||||||
- this.removeEffect(MobEffects.WEAKNESS);
|
- this.removeEffect(MobEffects.WEAKNESS);
|
||||||
- this.addEffect(new MobEffect(MobEffects.INCREASE_DAMAGE, i, Math.min(this.world.getDifficulty().a() - 1, 0)));
|
- this.addEffect(new MobEffect(MobEffects.INCREASE_DAMAGE, i, Math.min(this.world.getDifficulty().a() - 1, 0)));
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
|
+ this.persistent = true; // CraftBukkit - SPIGOT-4684 update persistence
|
||||||
+ this.removeEffect(MobEffects.WEAKNESS, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION);
|
+ this.removeEffect(MobEffects.WEAKNESS, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION);
|
||||||
+ this.addEffect(new MobEffect(MobEffects.INCREASE_DAMAGE, i, Math.min(this.world.getDifficulty().a() - 1, 0)), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION);
|
+ this.addEffect(new MobEffect(MobEffects.INCREASE_DAMAGE, i, Math.min(this.world.getDifficulty().a() - 1, 0)), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION);
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
this.world.broadcastEntityEffect(this, (byte) 16);
|
this.world.broadcastEntityEffect(this, (byte) 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,14 +128,20 @@
|
@@ -116,14 +129,20 @@
|
||||||
entityvillager.setAgeRaw(-24000);
|
entityvillager.setAgeRaw(-24000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,7 +71,7 @@
|
|||||||
if (this.bD != null) {
|
if (this.bD != null) {
|
||||||
EntityHuman entityhuman = this.world.b(this.bD);
|
EntityHuman entityhuman = this.world.b(this.bD);
|
||||||
|
|
||||||
@@ -132,7 +150,7 @@
|
@@ -132,7 +151,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@ public class CraftVillagerZombie extends CraftZombie implements ZombieVillager {
|
|||||||
if (time < 0) {
|
if (time < 0) {
|
||||||
getHandle().conversionTime = -1;
|
getHandle().conversionTime = -1;
|
||||||
getHandle().getDataWatcher().set(EntityZombieVillager.CONVERTING, false);
|
getHandle().getDataWatcher().set(EntityZombieVillager.CONVERTING, false);
|
||||||
|
getHandle().persistent = false; // CraftBukkit - SPIGOT-4684 update persistence
|
||||||
} else {
|
} else {
|
||||||
getHandle().startConversion((UUID) null, time);
|
getHandle().startConversion((UUID) null, time);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren