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
|
2021-08-26 04:16:27 +02:00
|
|
|
index acb4fe32835bca485cfb2ec509370c9f596d6a0f..7df8648240d43d01bcc2eb1f05f3dab2dc174f38 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
|
2021-06-15 15:20:52 +02:00
|
|
|
@@ -38,6 +38,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
|
2021-08-12 19:55:20 +02:00
|
|
|
index 46227aa96dce27570031d5390ececfdb91ec70d6..cf53e9c65e7e4bb90e94f3c46835eda8b2e19848 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
|
2021-06-14 15:45:16 +02:00
|
|
|
@@ -109,7 +109,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();
|