mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 18:31:29 +01:00
SPIGOT-4684: Update persistence of converting zombie villagers
This commit is contained in:
parent
f40143ef5e
commit
812f66aa99
@ -34,20 +34,21 @@
|
||||
|
||||
this.conversionTime -= i;
|
||||
if (this.conversionTime <= 0) {
|
||||
@@ -100,8 +110,10 @@
|
||||
@@ -100,8 +110,11 @@
|
||||
this.bD = uuid;
|
||||
this.conversionTime = i;
|
||||
this.getDataWatcher().set(EntityZombieVillager.CONVERTING, true);
|
||||
- this.removeEffect(MobEffects.WEAKNESS);
|
||||
- this.addEffect(new MobEffect(MobEffects.INCREASE_DAMAGE, i, Math.min(this.world.getDifficulty().a() - 1, 0)));
|
||||
+ // CraftBukkit start
|
||||
+ this.persistent = true; // CraftBukkit - SPIGOT-4684 update persistence
|
||||
+ 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);
|
||||
+ // CraftBukkit end
|
||||
this.world.broadcastEntityEffect(this, (byte) 16);
|
||||
}
|
||||
|
||||
@@ -116,14 +128,20 @@
|
||||
@@ -116,14 +129,20 @@
|
||||
entityvillager.setAgeRaw(-24000);
|
||||
}
|
||||
|
||||
@ -70,7 +71,7 @@
|
||||
if (this.bD != null) {
|
||||
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) {
|
||||
getHandle().conversionTime = -1;
|
||||
getHandle().getDataWatcher().set(EntityZombieVillager.CONVERTING, false);
|
||||
getHandle().persistent = false; // CraftBukkit - SPIGOT-4684 update persistence
|
||||
} else {
|
||||
getHandle().startConversion((UUID) null, time);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user