This commit is contained in:
70000hp 2024-01-07 16:24:31 -05:00
parent 27d613e1c2
commit a410efcf56
2 changed files with 11 additions and 0 deletions

View File

@ -81,6 +81,7 @@ public class EntityGlyphidScout extends EntityGlyphid {
target.setLocationAndAngles(dirVec.xCoord, dirVec.yCoord, dirVec.zCoord, 0, 0);
target.maxAge = 300;
target.radius = 6;
target.setWaypointType(TASK_BUILD_HIVE);
worldObj.spawnEntityInWorld(target);
hasTarget = true;
@ -291,6 +292,12 @@ public class EntityGlyphidScout extends EntityGlyphid {
return false;
}
@Override
protected Entity findPlayerToAttack() {
if(this.isPotionActive(Potion.blindness)) return null;
return this.worldObj.getClosestVulnerablePlayerToEntity(this, useExtendedTargeting() ? 128D : 8D);
}
///RAMPANT MODE STUFFS
/** Finds the direction from the bug's location to the target and adds it to their current coord

View File

@ -11,6 +11,7 @@ import java.util.UUID;
import com.hbm.config.MobConfig;
import com.hbm.config.RadiationConfig;
import com.hbm.entity.mob.EntityGlyphidDigger;
import com.hbm.entity.mob.EntityGlyphidScout;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
@ -362,8 +363,11 @@ public class PollutionHandler {
if (soot >= MobConfig.rampantScoutSpawnThresh) {
EntityGlyphidScout scout = new EntityGlyphidScout(event.world);
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);
event.world.spawnEntityInWorld(scout);
event.world.spawnEntityInWorld(digger);
}
}
}