Paper/Spigot-Server-Patches/0301-Check-Drowned-for-Villager-Aggression-Config.patch
Jake Potrebic 899bc53b79
Updated Upstream (Bukkit/CraftBukkit) (#4779)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
f47abd88 SPIGOT-6242: Fix some file line endings
de96535b SPIGOT-6234: enum classes don't serialize properly when implementing ConfigurationSerializable

CraftBukkit Changes:
4475707d SPIGOT-6244: /spawnpoint ignores angle
8b3b096d SPIGOT-6242: Fix some file line endings
4b33c749 SPIGOT-6186: Canceling a CreatureSpawnEvent​ results in a "Unable to summon entity due to duplicate UUIDs" error
2b3ca726 SPIGOT-6236: Vehicle passenger portal cooldown does not change
2020-11-17 22:45:18 -05:00

20 lines
1.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Wed, 10 Oct 2018 21:22:44 -0500
Subject: [PATCH] Check Drowned for Villager Aggression Config
diff --git a/src/main/java/net/minecraft/server/EntityDrowned.java b/src/main/java/net/minecraft/server/EntityDrowned.java
index 9c507cb0810029e3c5d7cb1055da170469315596..9ae0897bfd6a4577901d9189d0dba22f3ec2110c 100644
--- a/src/main/java/net/minecraft/server/EntityDrowned.java
+++ b/src/main/java/net/minecraft/server/EntityDrowned.java
@@ -31,7 +31,7 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity {
this.goalSelector.a(7, new PathfinderGoalRandomStroll(this, 1.0D));
this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityDrowned.class})).a(EntityPigZombie.class));
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, this::i));
- this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false));
+ if ( world.spigotConfig.zombieAggressiveTowardsVillager ) this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)); // Paper
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true));
this.targetSelector.a(5, new PathfinderGoalNearestAttackableTarget<>(this, EntityTurtle.class, 10, true, false, EntityTurtle.bo));
}