diff options
Diffstat (limited to 'nms-patches/EntityZombie.patch')
-rw-r--r-- | nms-patches/EntityZombie.patch | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/nms-patches/EntityZombie.patch b/nms-patches/EntityZombie.patch index 0fe3d3c0..c4348eb1 100644 --- a/nms-patches/EntityZombie.patch +++ b/nms-patches/EntityZombie.patch @@ -15,9 +15,9 @@ protected static final IAttribute a = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance"); @@ -19,6 +26,7 @@ - private boolean bC = false; - private float bD = -1.0F; - private float bE; + private boolean bD; + private float bE = -1.0F; + private float bF; + private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field public EntityZombie(World world) { @@ -59,25 +59,25 @@ + i *= elapsedTicks; + // CraftBukkit end - this.bB -= i; - if (this.bB <= 0) { -@@ -220,7 +240,14 @@ - int i = this.world.getDifficulty().a(); + this.bC -= i; + if (this.bC <= 0) { +@@ -221,7 +241,14 @@ - if (this.getItemInMainHand() == null && this.isBurning() && this.random.nextFloat() < (float) i * 0.3F) { -- entity.setOnFire(2 * i); + if (this.getItemInMainHand() == null) { + if (this.isBurning() && this.random.nextFloat() < f * 0.3F) { +- entity.setOnFire(2 * (int) f); + // CraftBukkit start -+ EntityCombustByEntityEvent event = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 2 * i); ++ EntityCombustByEntityEvent event = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 2 * (int) f); // PAIL: fixme + this.world.getServer().getPluginManager().callEvent(event); + + if (!event.isCancelled()) { + entity.setOnFire(event.getDuration()); + } + // CraftBukkit end - } - } + } -@@ -323,7 +350,7 @@ + if (this.getVillagerType() == EnumZombieType.HUSK && entity instanceof EntityLiving) { +@@ -335,7 +362,7 @@ entityzombie.setCustomNameVisible(entityvillager.getCustomNameVisible()); } @@ -86,16 +86,16 @@ this.world.a((EntityHuman) null, 1026, new BlockPosition((int) this.locX, (int) this.locY, (int) this.locZ), 0); } -@@ -377,7 +404,7 @@ +@@ -396,7 +423,7 @@ entitychicken1.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F); entitychicken1.prepare(difficultydamagescaler, (GroupDataEntity) null); - entitychicken1.o(true); + entitychicken1.p(true); - this.world.addEntity(entitychicken1); + this.world.addEntity(entitychicken1, CreatureSpawnEvent.SpawnReason.MOUNT); // CraftBukkit this.startRiding(entitychicken1); } } -@@ -461,7 +488,7 @@ +@@ -480,7 +507,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); } -@@ -517,11 +544,12 @@ +@@ -536,11 +563,12 @@ } public void die(DamageSource damagesource) { |