Files
Purpur/patches/server/0083-Add-option-for-zombies-targetting-turtle-eggs.patch
William Blake Galbreath 5c7cdad371 Updated Upstream (Paper & Tuinity)
Upstream has released updates that appears to apply and compile correctly

Paper Changes:
fcbeac8a [CI-SKIP] Readme update (#3702)
824f8086 Bandaid italic legacy serialization #3757 (#3760)

Tuinity Changes:
9f21359: Re-add optimise collision checking in player move packet handling
1152054: Revert player move packet optimisation
ef0a6c4: Optimise collision checking in player move packets
2020-07-02 20:38:04 -05:00

36 lines
1.8 KiB
Java

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Sat, 17 Aug 2019 15:27:09 -0500
Subject: [PATCH] Add option for zombies targetting turtle eggs
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index b66059836..00b89746f 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.purpurConfig.zombieTargetTurtleEggs) this.goalSelector.a(4, new EntityZombie.a(this, 1.0D, 3)); // Purpur
this.goalSelector.a(8, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F));
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
this.m();
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index a071129db..7da85ba5a 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -316,6 +316,11 @@ public class PurpurWorldConfig {
witherSkeletonTakesWitherDamage = getBoolean("mobs.wither_skeleton.takes-wither-damage", witherSkeletonTakesWitherDamage);
}
+ public boolean zombieTargetTurtleEggs = true;
+ private void zombieSettings() {
+ zombieTargetTurtleEggs = getBoolean("mobs.zombie.target-turtle-eggs", zombieTargetTurtleEggs);
+ }
+
public double zombieHorseSpawnChance = 0.0D;
private void zombieHorseSettings() {
zombieHorseSpawnChance = getDouble("mobs.zombie_horse.spawn-chance", zombieHorseSpawnChance);