Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
36 Zeilen
1.9 KiB
Diff
36 Zeilen
1.9 KiB
Diff
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 f9caed53ffc10300511b576cf822864b101df83d..483f7f790173f1fc30f2b2b98e543098114c4cab 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -57,6 +57,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 20d8e705ea432df64917b59f8290aa5400795f4b..c210f83044ec2cddbfb776094da3d7f5f21df23b 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
|
@@ -109,7 +109,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();
|