2016-03-01 00:23:45 +00:00
|
|
|
From 06d44f0f810440e2070437a393ac31f36df863d9 Mon Sep 17 00:00:00 2001
|
2014-07-21 20:46:54 +00: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
|
2016-02-29 21:33:06 +00:00
|
|
|
index d5f508b..ba2f12f 100644
|
2014-07-21 20:46:54 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
2016-02-29 21:33:06 +00:00
|
|
|
@@ -46,7 +46,7 @@ public class EntityZombie extends EntityMonster {
|
2014-07-21 20:46:54 +00:00
|
|
|
this.goalSelector.a(6, new PathfinderGoalMoveThroughVillage(this, 1.0D, false));
|
2014-11-28 01:17:45 +00:00
|
|
|
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, true, new Class[] { EntityPigZombie.class}));
|
|
|
|
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, true));
|
2016-02-29 21:33:06 +00: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));
|
2014-07-21 20:46:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
2016-02-29 21:33:06 +00:00
|
|
|
index 28643c5..6df2186 100644
|
2014-07-21 20:46:54 +00:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
2016-02-29 21:33:06 +00:00
|
|
|
@@ -203,4 +203,11 @@ public class SpigotWorldConfig
|
|
|
|
arrowDespawnRate = getInt( "arrow-despawn-rate", 1200 );
|
|
|
|
log( "Arrow Despawn Rate: " + arrowDespawnRate );
|
2014-07-21 20:46:54 +00:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean zombieAggressiveTowardsVillager;
|
|
|
|
+ private void zombieAggressiveTowardsVillager()
|
|
|
|
+ {
|
|
|
|
+ zombieAggressiveTowardsVillager = getBoolean( "zombie-aggressive-towards-villager", true );
|
|
|
|
+ log( "Zombie Aggressive Towards Villager: " + zombieAggressiveTowardsVillager );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2016-02-29 21:33:06 +00:00
|
|
|
2.5.0
|
2014-07-21 20:46:54 +00:00
|
|
|
|