diff --git a/src/main/java/com/hbm/config/MobConfig.java b/src/main/java/com/hbm/config/MobConfig.java index 1d57e39c8..e777a25bc 100644 --- a/src/main/java/com/hbm/config/MobConfig.java +++ b/src/main/java/com/hbm/config/MobConfig.java @@ -58,7 +58,7 @@ public class MobConfig { public static boolean rampantMode = false; public static boolean rampantNaturalScoutSpawn = false; - public static double rampantScoutSpawnThresh = 20; + public static double rampantScoutSpawnThresh = 14; public static int rampantScoutSpawnChance = 600; public static boolean scoutInitialSpawn = false; public static boolean rampantExtendedTargetting = false; @@ -101,7 +101,7 @@ public class MobConfig { spawnMax = CommonConfig.createConfigDouble(config, CATEGORY, "12.G07_spawnMax", "Maximum amount of glyphids being able to exist at once through natural spawning", 50); targetingThreshold = CommonConfig.createConfigDouble(config, CATEGORY, "12.G08_targetingThreshold", "Minimum amount of soot required for glyphids' extended targeting range to activate", 1D); - scoutSwarmSpawnChance = CommonConfig.createConfigInt(config, CATEGORY,"12.G10_scoutSwarmSpawn", "How likely are scouts to spawn in swarms, 1 in x chance format", 2); + scoutSwarmSpawnChance = CommonConfig.createConfigInt(config, CATEGORY,"12.G10_scoutSwarmSpawn", "How likely are scouts to spawn in swarms, 1 in x chance format", 3); largeHiveChance = CommonConfig.createConfigInt(config, CATEGORY,"12.G11_largeHiveChance", "The chance for a large hive to spawn, formula: 1/x", 5); largeHiveThreshold = CommonConfig.createConfigInt(config, CATEGORY,"12.G12_largeHiveThreshold", "The soot threshold for a large hive to spawn", 20); diff --git a/src/main/java/com/hbm/entity/mob/EntityGlyphidScout.java b/src/main/java/com/hbm/entity/mob/EntityGlyphidScout.java index 2d7b5c887..4d1e08a89 100644 --- a/src/main/java/com/hbm/entity/mob/EntityGlyphidScout.java +++ b/src/main/java/com/hbm/entity/mob/EntityGlyphidScout.java @@ -112,6 +112,10 @@ public class EntityGlyphidScout extends EntityGlyphid { hasTarget = true; } } + //fixes edge case where glyphids have no task and yet hasTarget is true + if(taskWaypoint == null && hasTarget){ + hasTarget = false; + } if (getCurrentTask() == TASK_TERRAFORM && super.isAtDestination() && canBuildHiveHere()) { communicate(TASK_TERRAFORM, taskWaypoint); @@ -295,9 +299,11 @@ public class EntityGlyphidScout extends EntityGlyphid { @Override protected Entity findPlayerToAttack() { if(this.isPotionActive(Potion.blindness)) return null; - - return this.worldObj.getClosestVulnerablePlayerToEntity(this, useExtendedTargeting() ? 128D : 8D); + //no extended targeting, and a low attack distance, ensures the scouts are focused in expanding, and not in chasing the player + return this.worldObj.getClosestVulnerablePlayerToEntity(this, 10); } + + ///RAMPANT MODE STUFFS /** Finds the direction from the bug's location to the target and adds it to their current coord diff --git a/src/main/java/com/hbm/handler/pollution/PollutionHandler.java b/src/main/java/com/hbm/handler/pollution/PollutionHandler.java index cdb218fb3..e946caeef 100644 --- a/src/main/java/com/hbm/handler/pollution/PollutionHandler.java +++ b/src/main/java/com/hbm/handler/pollution/PollutionHandler.java @@ -363,6 +363,7 @@ public class PollutionHandler { if (soot >= MobConfig.rampantScoutSpawnThresh) { EntityGlyphidScout scout = new EntityGlyphidScout(event.world); + //escort for the scout, which can also deal with obstacles EntityGlyphidDigger digger = new EntityGlyphidDigger(event.world); scout.setLocationAndAngles(event.x, event.y, event.z, event.world.rand.nextFloat() * 360.0F, 0.0F); digger.setLocationAndAngles(event.x, event.y, event.z, event.world.rand.nextFloat() * 360.0F, 0.0F);