From c69979247bdae6884d4edf377d485cf88ddfa0f5 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 28 Jun 2019 17:37:06 +1000 Subject: [PATCH] SPIGOT-5110: Zombies converting to drowned too quickly --- nms-patches/EntityZombie.patch | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/nms-patches/EntityZombie.patch b/nms-patches/EntityZombie.patch index 0e046eedd5..d48d588f84 100644 --- a/nms-patches/EntityZombie.patch +++ b/nms-patches/EntityZombie.patch @@ -36,7 +36,15 @@ if (this.drownedConversionTime < 0) { this.eb(); } -@@ -229,7 +242,12 @@ +@@ -192,6 +205,7 @@ + } + + public void startDrownedConversion(int i) { ++ this.lastTick = MinecraftServer.currentTick; // CraftBukkit + this.drownedConversionTime = i; + this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, true); + } +@@ -229,7 +243,12 @@ entityzombie.setCustomNameVisible(this.getCustomNameVisible()); } @@ -50,7 +58,7 @@ this.die(); } } -@@ -262,8 +280,8 @@ +@@ -262,8 +281,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())) { @@ -61,7 +69,7 @@ entityzombie.prepare(this.world, this.world.getDamageScaler(new BlockPosition(entityzombie)), EnumMobSpawn.REINFORCEMENT, (GroupDataEntity) null, (NBTTagCompound) null); this.getAttributeInstance(EntityZombie.d).b(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, AttributeModifier.Operation.ADDITION)); entityzombie.getAttributeInstance(EntityZombie.d).b(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, AttributeModifier.Operation.ADDITION)); -@@ -287,7 +305,14 @@ +@@ -287,7 +306,14 @@ float f = this.world.getDamageScaler(new BlockPosition(this)).b(); if (this.getItemInMainHand().isEmpty() && this.isBurning() && this.random.nextFloat() < f * 0.3F) { @@ -77,7 +85,7 @@ } } -@@ -377,7 +402,7 @@ +@@ -377,7 +403,7 @@ EntityZombieVillager entityzombievillager = (EntityZombieVillager) EntityTypes.ZOMBIE_VILLAGER.a(this.world); entityzombievillager.u(entityvillager); @@ -86,7 +94,7 @@ entityzombievillager.prepare(this.world, this.world.getDamageScaler(new BlockPosition(entityzombievillager)), EnumMobSpawn.CONVERSION, new EntityZombie.GroupDataZombie(false), (NBTTagCompound) null); entityzombievillager.setVillagerData(entityvillager.getVillagerData()); entityzombievillager.setOffers(entityvillager.getOffers().a()); -@@ -389,7 +414,13 @@ +@@ -389,7 +415,13 @@ entityzombievillager.setCustomNameVisible(entityvillager.getCustomNameVisible()); } @@ -101,7 +109,7 @@ this.world.a((EntityHuman) null, 1026, new BlockPosition(this), 0); } -@@ -436,7 +467,7 @@ +@@ -436,7 +468,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);