SPIGOT-5797: Zombie(Villagers) Instant Convert based on their lifetime
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -24,19 +24,26 @@
|
||||
|
||||
public EntityZombie(EntityTypes<? extends EntityZombie> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -144,7 +154,11 @@
|
||||
@@ -144,7 +154,10 @@
|
||||
public void tick() {
|
||||
if (!this.world.isClientSide && this.isAlive()) {
|
||||
if (this.isDrownConverting()) {
|
||||
- --this.drownedConversionTime;
|
||||
+ // CraftBukkit start - Use wall time instead of ticks for conversion
|
||||
+ int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
|
||||
+ this.lastTick = MinecraftServer.currentTick;
|
||||
+ this.drownedConversionTime -= elapsedTicks;
|
||||
+ // CraftBukkit end
|
||||
if (this.drownedConversionTime < 0) {
|
||||
this.ev();
|
||||
}
|
||||
@@ -161,6 +174,7 @@
|
||||
}
|
||||
|
||||
super.tick();
|
||||
+ this.lastTick = MinecraftServer.currentTick; // CraftBukkit
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -193,6 +207,7 @@
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user