2014-04-06 23:42:16 +00:00
|
|
|
From e23d0235ac494adf917bb40cc56e7fda781bdf1c Mon Sep 17 00:00:00 2001
|
2013-12-13 00:48:56 +00:00
|
|
|
From: Dylan Xaldin <Puremin0rez515@gmail.com>
|
|
|
|
Date: Thu, 12 Dec 2013 18:05:03 -0600
|
2013-12-13 00:54:00 +00:00
|
|
|
Subject: [PATCH] Allow Disabling Zombie Villager Aggression
|
2013-12-13 00:48:56 +00:00
|
|
|
|
|
|
|
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
|
2014-03-23 00:06:43 +00:00
|
|
|
index b751d01..902ecdf 100644
|
2013-12-13 00:48:56 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
2014-03-23 00:06:43 +00:00
|
|
|
@@ -28,7 +28,7 @@ public class EntityZombie extends EntityMonster {
|
2013-12-13 00:48:56 +00:00
|
|
|
this.getNavigation().b(true);
|
|
|
|
this.goalSelector.a(0, new PathfinderGoalFloat(this));
|
|
|
|
this.goalSelector.a(2, new PathfinderGoalMeleeAttack(this, EntityHuman.class, 1.0D, false));
|
|
|
|
- this.goalSelector.a(4, new PathfinderGoalMeleeAttack(this, EntityVillager.class, 1.0D, true));
|
|
|
|
+ if ( world.spigotConfig.zombieAggressiveTowardsVillager ) { this.goalSelector.a(4, new PathfinderGoalMeleeAttack(this, EntityVillager.class, 1.0D, true)); } // Spigot
|
|
|
|
this.goalSelector.a(5, new PathfinderGoalMoveTowardsRestriction(this, 1.0D));
|
|
|
|
this.goalSelector.a(6, new PathfinderGoalMoveThroughVillage(this, 1.0D, false));
|
|
|
|
this.goalSelector.a(7, new PathfinderGoalRandomStroll(this, 1.0D));
|
2014-03-23 00:06:43 +00:00
|
|
|
@@ -36,7 +36,7 @@ public class EntityZombie extends EntityMonster {
|
2013-12-13 00:48:56 +00:00
|
|
|
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
|
|
|
|
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, true));
|
|
|
|
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 0, true));
|
|
|
|
- this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityVillager.class, 0, false));
|
|
|
|
+ if ( world.spigotConfig.zombieAggressiveTowardsVillager ) { this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityVillager.class, 0, false)); } // Spigot
|
|
|
|
this.a(0.6F, 1.8F);
|
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
2014-03-09 21:37:28 +00:00
|
|
|
index 2c0501d..042280d 100644
|
2013-12-13 00:48:56 +00:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
2014-01-14 08:16:43 +00:00
|
|
|
@@ -243,4 +243,11 @@ public class SpigotWorldConfig
|
2013-12-13 00:48:56 +00:00
|
|
|
|
|
|
|
antiXrayInstance = new AntiXray( this );
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean zombieAggressiveTowardsVillager;
|
|
|
|
+ private void zombieAggressiveTowardsVillager()
|
|
|
|
+ {
|
|
|
|
+ zombieAggressiveTowardsVillager = getBoolean( "zombie-aggressive-towards-villager", true );
|
|
|
|
+ log( "Zombie Aggressive Towards Villager: " + zombieAggressiveTowardsVillager );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2014-03-23 00:06:43 +00:00
|
|
|
1.8.5.2.msysgit.0
|
2013-12-13 00:48:56 +00:00
|
|
|
|