@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/EntityZombie.java
|
||||
+++ b/net/minecraft/server/EntityZombie.java
|
||||
@@ -4,6 +4,13 @@
|
||||
import java.util.List;
|
||||
@@ -5,6 +5,13 @@
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
+//CraftBukkit start
|
||||
+import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
@@ -14,15 +14,15 @@
|
||||
public class EntityZombie extends EntityMonster {
|
||||
|
||||
protected static final IAttribute a = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
|
||||
@@ -18,6 +25,7 @@
|
||||
private boolean bB = false;
|
||||
private float bC = -1.0F;
|
||||
private float bD;
|
||||
@@ -19,6 +26,7 @@
|
||||
private boolean bC = false;
|
||||
private float bD = -1.0F;
|
||||
private float bE;
|
||||
+ private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
|
||||
|
||||
public EntityZombie(World world) {
|
||||
super(world);
|
||||
@@ -152,7 +160,14 @@
|
||||
@@ -153,7 +161,14 @@
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
@@ -38,7 +38,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -182,8 +197,8 @@
|
||||
@@ -183,8 +198,8 @@
|
||||
if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).q() && 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.a(entityzombie.getBoundingBox(), (Entity) entityzombie) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()).isEmpty() && !this.world.containsLiquid(entityzombie.getBoundingBox())) {
|
||||
@@ -49,7 +49,7 @@
|
||||
entityzombie.prepare(this.world.D(new BlockPosition(entityzombie)), (GroupDataEntity) null);
|
||||
this.getAttributeInstance(EntityZombie.a).b(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, 0));
|
||||
entityzombie.getAttributeInstance(EntityZombie.a).b(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, 0));
|
||||
@@ -202,6 +217,11 @@
|
||||
@@ -203,6 +218,11 @@
|
||||
public void m() {
|
||||
if (!this.world.isClientSide && this.isConverting()) {
|
||||
int i = this.getConversionTime();
|
||||
@@ -59,9 +59,9 @@
|
||||
+ i *= elapsedTicks;
|
||||
+ // CraftBukkit end
|
||||
|
||||
this.bA -= i;
|
||||
if (this.bA <= 0) {
|
||||
@@ -219,7 +239,14 @@
|
||||
this.bB -= i;
|
||||
if (this.bB <= 0) {
|
||||
@@ -220,7 +240,14 @@
|
||||
int i = this.world.getDifficulty().a();
|
||||
|
||||
if (this.getItemInMainHand() == null && this.isBurning() && this.random.nextFloat() < (float) i * 0.3F) {
|
||||
@@ -77,7 +77,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,7 +348,7 @@
|
||||
@@ -323,7 +350,7 @@
|
||||
entityzombie.setCustomNameVisible(entityvillager.getCustomNameVisible());
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
this.world.a((EntityHuman) null, 1026, new BlockPosition((int) this.locX, (int) this.locY, (int) this.locZ), 0);
|
||||
}
|
||||
|
||||
@@ -374,7 +401,7 @@
|
||||
@@ -377,7 +404,7 @@
|
||||
entitychicken1.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
|
||||
entitychicken1.prepare(difficultydamagescaler, (GroupDataEntity) null);
|
||||
entitychicken1.o(true);
|
||||
@@ -95,7 +95,7 @@
|
||||
this.startRiding(entitychicken1);
|
||||
}
|
||||
}
|
||||
@@ -458,7 +485,7 @@
|
||||
@@ -461,7 +488,7 @@
|
||||
entityvillager.setCustomNameVisible(this.getCustomNameVisible());
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
entityvillager.addEffect(new MobEffect(MobEffects.CONFUSION, 200, 0));
|
||||
this.world.a((EntityHuman) null, 1027, new BlockPosition((int) this.locX, (int) this.locY, (int) this.locZ), 0);
|
||||
}
|
||||
@@ -514,11 +541,12 @@
|
||||
@@ -517,11 +544,12 @@
|
||||
}
|
||||
|
||||
public void die(DamageSource damagesource) {
|
||||
|
||||
Reference in New Issue
Block a user