2018-12-13 11:00:00 +11:00
|
|
|
From 60834366bb915f084008c82e884a810cb6bc0bfd Mon Sep 17 00:00:00 2001
|
2014-04-12 14:18:37 +10:00
|
|
|
From: Dylan Xaldin <Puremin0rez515@gmail.com>
|
|
|
|
Date: Thu, 12 Dec 2013 18:05:03 -0600
|
|
|
|
Subject: [PATCH] Allow Disabling Zombie Villager Aggression
|
|
|
|
|
|
|
|
Ability to configure if Zombies will be aggressive towards Villagers.
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
2018-12-13 11:00:00 +11:00
|
|
|
index 0c41e5c95..cdac71887 100644
|
2014-04-12 14:18:37 +10:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
2018-11-14 14:20:34 +11:00
|
|
|
@@ -57,7 +57,7 @@ public class EntityZombie extends EntityMonster {
|
2018-07-15 10:00:00 +10:00
|
|
|
this.goalSelector.a(7, new PathfinderGoalRandomStrollLand(this, 1.0D));
|
2014-11-26 08:27:08 +11:00
|
|
|
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, true, new Class[] { EntityPigZombie.class}));
|
|
|
|
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, true));
|
2016-03-01 08:33:06 +11:00
|
|
|
- this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget(this, EntityVillager.class, false));
|
|
|
|
+ if ( world.spigotConfig.zombieAggressiveTowardsVillager ) this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget(this, EntityVillager.class, false)); // Spigot
|
|
|
|
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget(this, EntityIronGolem.class, true));
|
2018-07-15 10:00:00 +10:00
|
|
|
this.targetSelector.a(5, new PathfinderGoalNearestAttackableTarget(this, EntityTurtle.class, 10, true, false, EntityTurtle.bC));
|
2014-04-12 14:18:37 +10:00
|
|
|
}
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
2018-08-26 12:00:00 +10:00
|
|
|
index c7984825d..6f989ccfa 100644
|
2014-04-12 14:18:37 +10:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
2018-07-15 10:00:00 +10:00
|
|
|
@@ -198,4 +198,11 @@ public class SpigotWorldConfig
|
2016-03-01 08:33:06 +11:00
|
|
|
arrowDespawnRate = getInt( "arrow-despawn-rate", 1200 );
|
|
|
|
log( "Arrow Despawn Rate: " + arrowDespawnRate );
|
2014-04-12 14:18:37 +10:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean zombieAggressiveTowardsVillager;
|
|
|
|
+ private void zombieAggressiveTowardsVillager()
|
|
|
|
+ {
|
|
|
|
+ zombieAggressiveTowardsVillager = getBoolean( "zombie-aggressive-towards-villager", true );
|
|
|
|
+ log( "Zombie Aggressive Towards Villager: " + zombieAggressiveTowardsVillager );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2018-11-14 14:20:34 +11:00
|
|
|
2.19.1
|
2014-04-12 14:18:37 +10:00
|
|
|
|