@@ -17,8 +17,8 @@
|
||||
|
||||
protected static final IAttribute d = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
|
||||
@@ -23,6 +32,7 @@
|
||||
private boolean bE;
|
||||
private int bF;
|
||||
private boolean bB;
|
||||
private int bC;
|
||||
public int drownedConversionTime;
|
||||
+ private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
+ this.drownedConversionTime -= elapsedTicks;
|
||||
+ // CraftBukkit end
|
||||
if (this.drownedConversionTime < 0) {
|
||||
this.ea();
|
||||
this.ev();
|
||||
}
|
||||
@@ -193,6 +207,7 @@
|
||||
}
|
||||
@@ -45,10 +45,10 @@
|
||||
this.drownedConversionTime = i;
|
||||
this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, true);
|
||||
}
|
||||
@@ -231,7 +246,13 @@
|
||||
entityzombie.setCustomNameVisible(this.getCustomNameVisible());
|
||||
@@ -236,7 +251,13 @@
|
||||
}
|
||||
|
||||
entityzombie.setInvulnerable(this.isInvulnerable());
|
||||
- this.world.addEntity(entityzombie);
|
||||
+ // CraftBukkit start
|
||||
+ if (CraftEventFactory.callEntityTransformEvent(this, entityzombie, EntityTransformEvent.TransformReason.DROWNED).isCancelled()) {
|
||||
@@ -60,7 +60,7 @@
|
||||
this.die();
|
||||
}
|
||||
}
|
||||
@@ -264,8 +285,8 @@
|
||||
@@ -298,8 +319,8 @@
|
||||
if (this.world.getType(blockposition).a((IBlockAccess) this.world, blockposition, (Entity) entityzombie) && this.world.getLightLevel(new BlockPosition(i1, j1, k1)) < 10) {
|
||||
entityzombie.setPosition((double) i1, (double) j1, (double) k1);
|
||||
if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.i((Entity) entityzombie) && this.world.getCubes(entityzombie) && !this.world.containsLiquid(entityzombie.getBoundingBox())) {
|
||||
@@ -71,7 +71,7 @@
|
||||
entityzombie.prepare(this.world, this.world.getDamageScaler(new BlockPosition(entityzombie)), EnumMobSpawn.REINFORCEMENT, (GroupDataEntity) null, (NBTTagCompound) null);
|
||||
this.getAttributeInstance(EntityZombie.d).addModifier(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, AttributeModifier.Operation.ADDITION));
|
||||
entityzombie.getAttributeInstance(EntityZombie.d).addModifier(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, AttributeModifier.Operation.ADDITION));
|
||||
@@ -289,7 +310,14 @@
|
||||
@@ -323,7 +344,14 @@
|
||||
float f = this.world.getDamageScaler(new BlockPosition(this)).b();
|
||||
|
||||
if (this.getItemInMainHand().isEmpty() && this.isBurning() && this.random.nextFloat() < f * 0.3F) {
|
||||
@@ -87,7 +87,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -379,7 +407,7 @@
|
||||
@@ -413,7 +441,7 @@
|
||||
EntityZombieVillager entityzombievillager = (EntityZombieVillager) EntityTypes.ZOMBIE_VILLAGER.a(this.world);
|
||||
|
||||
entityzombievillager.u(entityvillager);
|
||||
@@ -95,11 +95,11 @@
|
||||
+ // entityvillager.die(); // CraftBukkit - moved down
|
||||
entityzombievillager.prepare(this.world, this.world.getDamageScaler(new BlockPosition(entityzombievillager)), EnumMobSpawn.CONVERSION, new EntityZombie.GroupDataZombie(false), (NBTTagCompound) null);
|
||||
entityzombievillager.setVillagerData(entityvillager.getVillagerData());
|
||||
entityzombievillager.a((NBTBase) entityvillager.es().a((DynamicOps) DynamicOpsNBT.a).getValue());
|
||||
@@ -392,7 +420,13 @@
|
||||
entityzombievillager.setCustomNameVisible(entityvillager.getCustomNameVisible());
|
||||
entityzombievillager.a((NBTBase) entityvillager.eN().a((DynamicOps) DynamicOpsNBT.a).getValue());
|
||||
@@ -431,7 +459,13 @@
|
||||
}
|
||||
|
||||
entityzombievillager.setInvulnerable(this.isInvulnerable());
|
||||
- this.world.addEntity(entityzombievillager);
|
||||
+ // CraftBukkit start
|
||||
+ if (CraftEventFactory.callEntityTransformEvent(this, entityzombievillager, EntityTransformEvent.TransformReason.INFECTION).isCancelled()) {
|
||||
@@ -111,8 +111,8 @@
|
||||
this.world.a((EntityHuman) null, 1026, new BlockPosition(this), 0);
|
||||
}
|
||||
|
||||
@@ -439,7 +473,7 @@
|
||||
entitychicken1.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
|
||||
@@ -478,7 +512,7 @@
|
||||
entitychicken1.setPositionRotation(this.locX(), this.locY(), this.locZ(), this.yaw, 0.0F);
|
||||
entitychicken1.prepare(generatoraccess, difficultydamagescaler, EnumMobSpawn.JOCKEY, (GroupDataEntity) null, (NBTTagCompound) null);
|
||||
entitychicken1.r(true);
|
||||
- generatoraccess.addEntity(entitychicken1);
|
||||
|
||||
Reference in New Issue
Block a user