diff options
author | Nassim Jahnke <[email protected]> | 2021-11-24 17:06:46 +0100 |
---|---|---|
committer | MiniDigger | Martin <[email protected]> | 2021-11-30 19:26:33 +0100 |
commit | 97a4a707665251ee55f5f7ed609f8d3779c6ded9 (patch) | |
tree | 817a539bda9cc44c2a37197287337431137b4b14 /patches/server/0486-Add-zombie-targets-turtle-egg-config.patch | |
parent | 45c36e5d0c1a09a2fa144abee5705524fb758e7a (diff) | |
download | Paper-97a4a707665251ee55f5f7ed609f8d3779c6ded9.tar.gz Paper-97a4a707665251ee55f5f7ed609f8d3779c6ded9.zip |
More more more more more more more more more more more more more more work
Diffstat (limited to 'patches/server/0486-Add-zombie-targets-turtle-egg-config.patch')
-rw-r--r-- | patches/server/0486-Add-zombie-targets-turtle-egg-config.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/patches/server/0486-Add-zombie-targets-turtle-egg-config.patch b/patches/server/0486-Add-zombie-targets-turtle-egg-config.patch new file mode 100644 index 0000000000..3bc9667e55 --- /dev/null +++ b/patches/server/0486-Add-zombie-targets-turtle-egg-config.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath <[email protected]> +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 a5361e1dba7c025667c7627b8851655bba2c9c6a..30d7e3d7c24aea43510135382bc9f482582fb7fa 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -55,6 +55,11 @@ public class PaperWorldConfig { + } + } + ++ public boolean zombiesTargetTurtleEggs = true; ++ private void zombiesTargetTurtleEggs() { ++ zombiesTargetTurtleEggs = getBoolean("zombies-target-turtle-eggs", zombiesTargetTurtleEggs); ++ } ++ + public short keepLoadedRange; + private void keepLoadedRange() { + keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); +diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java +index de140adee6679e27598ecd7fe292cd657c7af303..252a079d4867a5ce7fb6a982cf668d2348f7292f 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java +@@ -106,7 +106,7 @@ public class Zombie extends Monster { + + @Override + protected void registerGoals() { +- this.goalSelector.addGoal(4, new Zombie.ZombieAttackTurtleEggGoal(this, 1.0D, 3)); ++ if (level.paperConfig.zombiesTargetTurtleEggs) this.goalSelector.addGoal(4, new Zombie.ZombieAttackTurtleEggGoal(this, 1.0D, 3)); // Paper + this.goalSelector.addGoal(8, new LookAtPlayerGoal(this, Player.class, 8.0F)); + this.goalSelector.addGoal(8, new RandomLookAroundGoal(this)); + this.addBehaviourGoals(); |