Proper Reformating

This commit is contained in:
Kam committed 2025-03-13 17:14:45 -04:00
1 parent ce75880aba
commit 180d257024
1179 files changed
+59847 -61583

No files matched your search

@@ -6,15 +6,13 @@ import net.minecraft.util.Vec3;
import noppes.npcs.constants.AiMutex;
import noppes.npcs.entity.EntityNPCInterface;
public class EntityAIDodgeShoot extends EntityAIBase
{
public class EntityAIDodgeShoot extends EntityAIBase {
private EntityNPCInterface entity;
private double xPosition;
private double yPosition;
private double zPosition;
public EntityAIDodgeShoot(EntityNPCInterface par1EntityNPCInterface)
{
public EntityAIDodgeShoot(EntityNPCInterface par1EntityNPCInterface) {
this.entity = par1EntityNPCInterface;
this.setMutexBits(AiMutex.PASSIVE);
}
@@ -22,33 +20,23 @@ public class EntityAIDodgeShoot extends EntityAIBase
/**
* Returns whether the EntityAIBase should begin execution.
*/
public boolean shouldExecute()
{
EntityLivingBase var1 = this.entity.getAttackTarget();
public boolean shouldExecute() {
EntityLivingBase var1 = this.entity.getAttackTarget();
if (var1 == null || !var1.isEntityAlive())
{
if (var1 == null || !var1.isEntityAlive()) {
return false;
}
if (this.entity.inventory.getProjectile() == null)
{
return false;
}
else if (this.entity.getRangedTask() == null)
{
return false;
}
else
{
if (this.entity.inventory.getProjectile() == null) {
return false;
} else if (this.entity.getRangedTask() == null) {
return false;
} else {
Vec3 vec = this.entity.getRangedTask().hasFired() ? RandomPositionGeneratorAlt.findRandomTarget(this.entity, 4, 1) : null;
Vec3 vec = this.entity.getRangedTask().hasFired() ? RandomPositionGeneratorAlt.findRandomTarget(this.entity, 4, 1) : null;
if (vec == null)
{
if (vec == null) {
return false;
}
else
{
} else {
this.xPosition = vec.xCoord;
this.yPosition = vec.yCoord;
this.zPosition = vec.zCoord;
@@ -60,25 +48,22 @@ public class EntityAIDodgeShoot extends EntityAIBase
/**
* Returns whether an in-progress EntityAIBase should continue executing
*/
public boolean continueExecuting()
{
public boolean continueExecuting() {
return !this.entity.getNavigator().noPath();
}
/**
* Execute a one shot task or start executing a continuous task
*/
public void startExecuting()
{
public void startExecuting() {
this.entity.getNavigator().tryMoveToXYZ(this.xPosition, this.yPosition, this.zPosition, 1.2D);
}
/**
* Updates the task
*/
public void updateTask()
{
if (this.entity.getAttackTarget() != null)
this.entity.getLookHelper().setLookPositionWithEntity(this.entity.getAttackTarget(), 30.0F, 30.0F);
public void updateTask() {
if (this.entity.getAttackTarget() != null)
this.entity.getLookHelper().setLookPositionWithEntity(this.entity.getAttackTarget(), 30.0F, 30.0F);
}
}