SPIGOT-4526: Add conversion time API for Zombie & subclasses
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -16,8 +16,17 @@
|
||||
public class EntityZombie extends EntityMonster {
|
||||
|
||||
protected static final IAttribute c = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
|
||||
@@ -21,6 +30,7 @@
|
||||
private int drownedConversionTime;
|
||||
@@ -14,13 +23,14 @@
|
||||
private static final DataWatcherObject<Boolean> bC = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
||||
private static final DataWatcherObject<Integer> bD = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
|
||||
private static final DataWatcherObject<Boolean> bE = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
||||
- private static final DataWatcherObject<Boolean> bF = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
||||
+ public static final DataWatcherObject<Boolean> bF = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); // PAIL
|
||||
private final PathfinderGoalBreakDoor bG;
|
||||
private boolean bH;
|
||||
private int bI;
|
||||
- private int drownedConversionTime;
|
||||
+ public int drownedConversionTime; // PAIL
|
||||
private float bK;
|
||||
private float bL;
|
||||
+ private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
|
||||
@@ -39,7 +48,7 @@
|
||||
if (this.drownedConversionTime < 0) {
|
||||
this.dE();
|
||||
}
|
||||
@@ -182,7 +196,14 @@
|
||||
@@ -182,14 +196,21 @@
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
@@ -55,6 +64,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
super.movementTick();
|
||||
}
|
||||
|
||||
- private void a(int i) {
|
||||
+ public void a(int i) { // PAIL
|
||||
this.drownedConversionTime = i;
|
||||
this.getDataWatcher().set(EntityZombie.bF, true);
|
||||
}
|
||||
@@ -221,7 +242,12 @@
|
||||
entityzombie.setCustomNameVisible(this.getCustomNameVisible());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user