5a0150f586ed3eb15fe6f1f596d1a5a7d806f0f9 Fix ITEM_BREAK e6a3911057bd94d8bd7021cbb4923fb84fb106d1 Upstream merge d1cdcf8d4c3639f956474f02ed662517cffbe23e Remove old patch 068df64aeee368377e1673667bffc7a6dcf90554 Rebuild all patches
46 lines
2.4 KiB
Diff
46 lines
2.4 KiB
Diff
From 7a2d55f11e40d55120d908d5eab00ce4a7768b42 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 378ab11..d50ddd4 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
|
@@ -39,12 +39,12 @@ public class EntityZombie extends EntityMonster {
|
|
}
|
|
|
|
protected void n() {
|
|
- 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(4, new PathfinderGoalMeleeAttack(this, EntityIronGolem.class, 1.0D, true));
|
|
this.goalSelector.a(6, new PathfinderGoalMoveThroughVillage(this, 1.0D, false));
|
|
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, true, new Class[] { EntityPigZombie.class}));
|
|
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, true));
|
|
- this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityVillager.class, false));
|
|
+ if ( world.spigotConfig.zombieAggressiveTowardsVillager ) this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityVillager.class, false)); // Spigot
|
|
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityIronGolem.class, true));
|
|
}
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
index 45b2aae..b8e144d 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
@@ -245,4 +245,11 @@ public class SpigotWorldConfig
|
|
|
|
antiXrayInstance = new AntiXray( this );
|
|
}
|
|
+
|
|
+ public boolean zombieAggressiveTowardsVillager;
|
|
+ private void zombieAggressiveTowardsVillager()
|
|
+ {
|
|
+ zombieAggressiveTowardsVillager = getBoolean( "zombie-aggressive-towards-villager", true );
|
|
+ log( "Zombie Aggressive Towards Villager: " + zombieAggressiveTowardsVillager );
|
|
+ }
|
|
}
|
|
--
|
|
2.1.0
|
|
|