use of me.wallhacks.spark.util.objects.PredictedEntity in project Spark-Client by Spark-Client-Development.
the class CrystalAura method getValueForCrystalExplodingAtPoint.
// methods to calculate crystal things
ValueForExplodingCrystalAtPoint getValueForCrystalExplodingAtPoint(Vec3d pos, boolean prePlace) {
float bestValue = -1;
float myhealth = mc.player.getHealth() + mc.player.getAbsorptionAmount();
float selfdam = CrystalUtil.calculateDamageCrystal(pos, predictedPlayer, prePlace);
PredictedEntity target = null;
boolean facePlace = false;
if (selfdam + 2 < myhealth || !NoSuicide.isOn())
if (maxSelfdamage.getValue() > selfdam || maxSelfdamage.getValue() == 0) {
for (PredictedEntity ct : predictedEnemies) {
EntityLivingBase e = ct.entity;
float d = (float) (CrystalUtil.calculateDamageCrystal(pos, ct, prePlace) - selfdam * protectSelf.getValue());
double minD = minEnemydamage.getValue();
boolean f = false;
if (d < minD)
if (e.getHealth() + e.getAbsorptionAmount() < facePlaceHealth.getValue() || facePlaceKey.isDown() || armor(e)) {
f = true;
minD = 1.5D;
}
if (d > Math.max(minD, bestValue)) {
bestValue = d;
facePlace = f;
target = ct;
}
}
}
return new ValueForExplodingCrystalAtPoint(target, bestValue, facePlace);
}
use of me.wallhacks.spark.util.objects.PredictedEntity in project Spark-Client by Spark-Client-Development.
the class CrystalAura method predictTarget.
void predictTarget() {
predictedPlayer = new PredictedEntity(mc.player, prediction.getValue());
predictedEnemies.clear();
for (Entity e : mc.world.loadedEntityList) {
if (e instanceof EntityLivingBase)
if (e != mc.player)
if (!PlayersOnly.isOn() || e instanceof EntityPlayer)
if (AttackUtil.canAttackEntity((EntityLivingBase) e, 15))
predictedEnemies.add(new PredictedEntity((EntityLivingBase) e, prediction.getValue()));
}
}
Aggregations