mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-28 07:55:39 +00:00
Code Cleanup / Reformat
This commit is contained in:
1 parent
800eec4d81
commit
43bc1eb81f
40 files changed
+258
-243
No files matched your search
@@ -50,17 +50,17 @@ public class EntityAIRangedAttack extends EntityAIBase {
|
||||
public boolean shouldExecute() {
|
||||
EntityLivingBase var1 = this.entityHost.getAttackTarget();
|
||||
|
||||
if (var1 == null || !var1.isEntityAlive()){
|
||||
if (var1 == null || !var1.isEntityAlive()) {
|
||||
isShooting = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (entityHost.getDistanceToEntity(var1) > entityHost.stats.aggroRange){
|
||||
if (entityHost.getDistanceToEntity(var1) > entityHost.stats.aggroRange) {
|
||||
isShooting = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.entityHost.inventory.getProjectile() == null){
|
||||
if (this.entityHost.inventory.getProjectile() == null) {
|
||||
isShooting = false;
|
||||
return false;
|
||||
}
|
||||
@@ -68,12 +68,10 @@ public class EntityAIRangedAttack extends EntityAIBase {
|
||||
double var2 = this.entityHost.getDistanceSq(var1.posX, var1.boundingBox.minY, var1.posZ);
|
||||
double var3 = this.entityHost.ais.distanceToMelee * this.entityHost.ais.distanceToMelee;
|
||||
|
||||
if (this.entityHost.ais.useRangeMelee >= 1 && var2 <= var3){
|
||||
if (this.entityHost.ais.useRangeMelee >= 1 && var2 <= var3) {
|
||||
isShooting = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
else {
|
||||
} else {
|
||||
this.attackTarget = var1;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user