@@ -33,7 +33,7 @@
|
||||
Objects.requireNonNull(logger);
|
||||
@@ -138,6 +146,10 @@
|
||||
public void tick() {
|
||||
if (!this.level.isClientSide && this.isAlive() && this.isConverting()) {
|
||||
if (!this.level().isClientSide && this.isAlive() && this.isConverting()) {
|
||||
int i = this.getConversionProgress();
|
||||
+ // CraftBukkit start - Use wall time instead of ticks for villager conversion
|
||||
+ int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
|
||||
@@ -55,12 +55,12 @@
|
||||
this.villagerConversionTime = i;
|
||||
this.getEntityData().set(EntityZombieVillager.DATA_CONVERTING_ID, true);
|
||||
- this.removeEffect(MobEffects.WEAKNESS);
|
||||
- this.addEffect(new MobEffect(MobEffects.DAMAGE_BOOST, i, Math.min(this.level.getDifficulty().getId() - 1, 0)));
|
||||
- this.addEffect(new MobEffect(MobEffects.DAMAGE_BOOST, i, Math.min(this.level().getDifficulty().getId() - 1, 0)));
|
||||
+ // CraftBukkit start
|
||||
+ this.removeEffect(MobEffects.WEAKNESS, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION);
|
||||
+ this.addEffect(new MobEffect(MobEffects.DAMAGE_BOOST, i, Math.min(this.level.getDifficulty().getId() - 1, 0)), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION);
|
||||
+ this.addEffect(new MobEffect(MobEffects.DAMAGE_BOOST, i, Math.min(this.level().getDifficulty().getId() - 1, 0)), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION);
|
||||
+ // CraftBukkit end
|
||||
this.level.broadcastEntityEvent(this, (byte) 16);
|
||||
this.level().broadcastEntityEvent(this, (byte) 16);
|
||||
}
|
||||
|
||||
@@ -207,7 +222,13 @@
|
||||
|
||||
Reference in New Issue
Block a user