Paper/patches/server/0281-Check-Drowned-for-Villager-Aggression-Config.patch

20 lines
1.6 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: Wed, 10 Oct 2018 21:22:44 -0500
Subject: [PATCH] Check Drowned for Villager Aggression Config
diff --git a/src/main/java/net/minecraft/world/entity/monster/Drowned.java b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
2021-11-24 00:56:42 +01:00
index 0a458a88c21c8eece3b08cf7f5d7533efcd879f1..ccaa50d1ba9151bd94333b6b8fc0e77bc4324990 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
2021-06-13 08:48:25 +02:00
@@ -79,7 +79,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
2021-06-11 14:02:28 +02:00
this.goalSelector.addGoal(7, new RandomStrollGoal(this, 1.0D));
2021-06-13 08:48:25 +02:00
this.targetSelector.addGoal(1, (new HurtByTargetGoal(this, Drowned.class)).setAlertOthers(ZombifiedPiglin.class));
2021-06-11 14:02:28 +02:00
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::okTarget));
- this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, false));
2021-06-13 08:48:25 +02:00
+ if (this.level.spigotConfig.zombieAggressiveTowardsVillager) this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, false)); // Paper
2021-06-11 14:02:28 +02:00
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolem.class, true));
2021-06-13 08:48:25 +02:00
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Axolotl.class, true, false));
2021-06-11 14:02:28 +02:00
this.targetSelector.addGoal(5, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, true, false, Turtle.BABY_ON_LAND_SELECTOR));