Paper/patches/server/0484-Add-zombie-targets-turtle-egg-config.patch

36 lines
1.9 KiB
Diff
Raw Normal View History

2021-06-11 14:02:28 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
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 536fc6bf1451ea84af6084b1976eee32bf328ab0..12a77caa7899bc6d000d48d13a504476c3f125ab 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -68,6 +68,11 @@ public class PaperWorldConfig {
2021-06-11 14:02:28 +02:00
}
}
2021-06-14 15:45:16 +02:00
2021-06-11 14:02:28 +02:00
+ public boolean zombiesTargetTurtleEggs = true;
+ private void zombiesTargetTurtleEggs() {
+ zombiesTargetTurtleEggs = getBoolean("zombies-target-turtle-eggs", zombiesTargetTurtleEggs);
+ }
2021-06-14 15:45:16 +02:00
+
public short keepLoadedRange;
private void keepLoadedRange() {
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
2021-06-11 14:02:28 +02:00
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
2022-06-08 08:06:17 +02:00
index 6efce73f5233927104ec772e16a370926317d80d..847dbd6dae8e9a615ade642c598bc7bb45fb4722 100644
2021-06-11 14:02:28 +02:00
--- 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 {
2021-06-11 14:02:28 +02:00
@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();