From dfc54a8b92f1c166e611cc741e8478b233e4b01a Mon Sep 17 00:00:00 2001 From: Mariell Date: Sun, 30 Aug 2020 20:27:50 +0200 Subject: [PATCH] Add zombie targets turtle egg config (#4181) Co-authored-by: BillyGalbreath --- ...Add-zombie-targets-turtle-egg-config.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Spigot-Server-Patches/0565-Add-zombie-targets-turtle-egg-config.patch diff --git a/Spigot-Server-Patches/0565-Add-zombie-targets-turtle-egg-config.patch b/Spigot-Server-Patches/0565-Add-zombie-targets-turtle-egg-config.patch new file mode 100644 index 0000000000..55022c8df9 --- /dev/null +++ b/Spigot-Server-Patches/0565-Add-zombie-targets-turtle-egg-config.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Sun, 23 Aug 2020 15:47:34 +0200 +Subject: [PATCH] Add zombie targets turtle egg config + + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index d5a1ade21749bba420257f3ece7878f32148d6ff..b286928cca6effb7adf07bfd2882cb6c5bbffcf2 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -654,4 +654,9 @@ public class PaperWorldConfig { + maxLightningFlashDistance = 512; // Vanilla value + } + } ++ ++ public boolean zombiesTargetTurtleEggs = true; ++ private void zombiesTargetTurtleEggs() { ++ zombiesTargetTurtleEggs = getBoolean("zombies-target-turtle-eggs", zombiesTargetTurtleEggs); ++ } + } +diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java +index 039c5f4387b5383b15bd8b954eb464089612a303..b55851cad3290a8ba1538203cca4c01e5f31b1b4 100644 +--- a/src/main/java/net/minecraft/server/EntityZombie.java ++++ b/src/main/java/net/minecraft/server/EntityZombie.java +@@ -46,7 +46,7 @@ public class EntityZombie extends EntityMonster { + + @Override + protected void initPathfinder() { +- this.goalSelector.a(4, new EntityZombie.a(this, 1.0D, 3)); ++ if (world.paperConfig.zombiesTargetTurtleEggs) this.goalSelector.a(4, new EntityZombie.a(this, 1.0D, 3)); // Paper + this.goalSelector.a(8, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); + this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); + this.m();