mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
minor scout tweak no.45
This commit is contained in:
parent
a410efcf56
commit
acf65b8922
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user