@@ -13,9 +13,9 @@
|
||||
public class EntityZombieVillager extends EntityZombie implements VillagerDataHolder {
|
||||
|
||||
@@ -13,6 +18,7 @@
|
||||
private NBTBase bB;
|
||||
private NBTTagCompound bC;
|
||||
private int bD;
|
||||
private NBTBase by;
|
||||
private NBTTagCompound bz;
|
||||
private int bA;
|
||||
+ private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
|
||||
|
||||
public EntityZombieVillager(EntityTypes<? extends EntityZombieVillager> entitytypes, World world) {
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
this.conversionTime -= i;
|
||||
if (this.conversionTime <= 0) {
|
||||
@@ -122,8 +133,11 @@
|
||||
@@ -123,8 +134,11 @@
|
||||
this.conversionPlayer = uuid;
|
||||
this.conversionTime = i;
|
||||
this.getDataWatcher().set(EntityZombieVillager.CONVERTING, true);
|
||||
@@ -46,7 +46,7 @@
|
||||
this.world.broadcastEntityEffect(this, (byte) 16);
|
||||
}
|
||||
|
||||
@@ -146,14 +160,21 @@
|
||||
@@ -166,7 +180,7 @@
|
||||
entityvillager.setAgeRaw(-24000);
|
||||
}
|
||||
|
||||
@@ -55,9 +55,10 @@
|
||||
entityvillager.setNoAI(this.isNoAI());
|
||||
if (this.hasCustomName()) {
|
||||
entityvillager.setCustomName(this.getCustomName());
|
||||
entityvillager.setCustomNameVisible(this.getCustomNameVisible());
|
||||
@@ -178,7 +192,14 @@
|
||||
}
|
||||
|
||||
entityvillager.setInvulnerable(this.isInvulnerable());
|
||||
- worldserver.addEntity(entityvillager);
|
||||
+ // CraftBukkit start
|
||||
+ if (CraftEventFactory.callEntityTransformEvent(this, entityvillager, EntityTransformEvent.TransformReason.CURED).isCancelled()) {
|
||||
@@ -70,7 +71,7 @@
|
||||
if (this.conversionPlayer != null) {
|
||||
EntityHuman entityhuman = worldserver.b(this.conversionPlayer);
|
||||
|
||||
@@ -163,7 +184,7 @@
|
||||
@@ -188,7 +209,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user