mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 06:09:05 +00:00
Proper Reformating
This commit is contained in:
1 parent
ce75880aba
commit
180d257024
1179 files changed
+59847
-61583
No files matched your search
@@ -3,12 +3,10 @@ package noppes.npcs.ai;
|
||||
import net.minecraft.entity.ai.EntityAIBase;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
public class EntityAIWaterNav extends EntityAIBase
|
||||
{
|
||||
public class EntityAIWaterNav extends EntityAIBase {
|
||||
private EntityNPCInterface theEntity;
|
||||
|
||||
public EntityAIWaterNav(EntityNPCInterface par1EntityNPCInterface)
|
||||
{
|
||||
public EntityAIWaterNav(EntityNPCInterface par1EntityNPCInterface) {
|
||||
this.theEntity = par1EntityNPCInterface;
|
||||
par1EntityNPCInterface.getNavigator().setCanSwim(true);
|
||||
}
|
||||
@@ -16,18 +14,13 @@ public class EntityAIWaterNav extends EntityAIBase
|
||||
/**
|
||||
* Returns whether the EntityAIBase should begin execution.
|
||||
*/
|
||||
public boolean shouldExecute()
|
||||
{
|
||||
if (this.theEntity.isInWater() || this.theEntity.handleLavaMovement())
|
||||
{
|
||||
if (this.theEntity.ais.canSwim)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (this.theEntity.isCollidedHorizontally)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public boolean shouldExecute() {
|
||||
if (this.theEntity.isInWater() || this.theEntity.handleLavaMovement()) {
|
||||
if (this.theEntity.ais.canSwim) {
|
||||
return true;
|
||||
} else if (this.theEntity.isCollidedHorizontally) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
@@ -36,10 +29,8 @@ public class EntityAIWaterNav extends EntityAIBase
|
||||
/**
|
||||
* Updates the task
|
||||
*/
|
||||
public void updateTask()
|
||||
{
|
||||
if (this.theEntity.getRNG().nextFloat() < 0.8F)
|
||||
{
|
||||
public void updateTask() {
|
||||
if (this.theEntity.getRNG().nextFloat() < 0.8F) {
|
||||
this.theEntity.getJumpHelper().setJumping();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user