SPIGOT-4526: Add conversion time API for Zombie & subclasses
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityZombieVillager.java
|
||||
+++ b/net/minecraft/server/EntityZombieVillager.java
|
||||
@@ -2,6 +2,10 @@
|
||||
@@ -2,13 +2,18 @@
|
||||
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Nullable;
|
||||
@@ -11,9 +11,11 @@
|
||||
|
||||
public class EntityZombieVillager extends EntityZombie {
|
||||
|
||||
@@ -9,6 +13,7 @@
|
||||
- private static final DataWatcherObject<Boolean> a = DataWatcher.a(EntityZombieVillager.class, DataWatcherRegistry.i);
|
||||
+ public static final DataWatcherObject<Boolean> a = DataWatcher.a(EntityZombieVillager.class, DataWatcherRegistry.i); // PAIL
|
||||
private static final DataWatcherObject<Integer> b = DataWatcher.a(EntityZombieVillager.class, DataWatcherRegistry.b);
|
||||
private int conversionTime;
|
||||
- private int conversionTime;
|
||||
+ public int conversionTime; // PAIL
|
||||
private UUID bD;
|
||||
+ private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
|
||||
|
||||
@@ -34,7 +36,12 @@
|
||||
|
||||
this.conversionTime -= i;
|
||||
if (this.conversionTime <= 0) {
|
||||
@@ -100,8 +110,10 @@
|
||||
@@ -96,12 +106,14 @@
|
||||
return (Boolean) this.getDataWatcher().get(EntityZombieVillager.a);
|
||||
}
|
||||
|
||||
- protected void a(@Nullable UUID uuid, int i) {
|
||||
+ public void a(@Nullable UUID uuid, int i) { // PAIL
|
||||
this.bD = uuid;
|
||||
this.conversionTime = i;
|
||||
this.getDataWatcher().set(EntityZombieVillager.a, true);
|
||||
|
||||
Reference in New Issue
Block a user