diff --git a/src/main/java/crazypants/enderio/config/Config.java b/src/main/java/crazypants/enderio/config/Config.java index c823d962..bc511431 100644 --- a/src/main/java/crazypants/enderio/config/Config.java +++ b/src/main/java/crazypants/enderio/config/Config.java @@ -354,9 +354,8 @@ public final class Config { public static int enderminyHealth = 20; public static boolean enderminyGroupAgro = true; public static int enderminyMaxGroupSize = 3; + public static boolean enderminySpawnInLitAreas = false; - - public static void load(FMLPreInitializationEvent event) { @@ -943,6 +942,8 @@ public final class Config { "When true attacking one Enderminy will cause other Enderminies who witness the attack to attack the player as well"); enderminyMaxGroupSize= config.get(sectionMobConfig.name, "enderminyMaxGroupSize", enderminyMaxGroupSize, "Maximum number of Enderminies that will spawn in a single group").getInt(enderminyMaxGroupSize); + enderminySpawnInLitAreas= config.getBoolean("enderminySpawnInLitAreas", sectionMobConfig.name, enderminySpawnInLitAreas, + "When true enderminies will spawn in well lit areas, when false they will only spawn in dark areas."); } private Config() { diff --git a/src/main/java/crazypants/enderio/entity/EntityEnderminy.java b/src/main/java/crazypants/enderio/entity/EntityEnderminy.java index ca2ec635..df4b6a06 100644 --- a/src/main/java/crazypants/enderio/entity/EntityEnderminy.java +++ b/src/main/java/crazypants/enderio/entity/EntityEnderminy.java @@ -82,7 +82,7 @@ public class EntityEnderminy extends EntityMob { @Override protected boolean isValidLightLevel() { - return true; + return Config.enderminySpawnInLitAreas ? true : super.isValidLightLevel(); } protected void applyEntityAttributes() {