EntityNPCInterface:

-Fixed looping error in setAir() and updateAITasks()
This commit is contained in:
Luis C.M committed 2022-06-29 14:36:17 -05:00
1 parent f2c4f0ccaf
commit 91ac09d8d9
1 file changed
+2 -2
@@ -415,7 +415,7 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
protected void updateAITasks()
{
if (this.worldObj.isAnyLiquid(this.boundingBox) || this.stats.drowningType != 2) {
if (this.isInWater() || this.stats.drowningType != 2) {
this.getNavigator().onUpdateNavigation();
this.getMoveHelper().onUpdateMoveHelper();
try {
@@ -818,7 +818,7 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
@Override
public void setAir(int air) {
if (this.worldObj.isAnyLiquid(this.boundingBox) || air < this.getAir() || this.stats.drowningType != 2) {
if (this.isInWater() || air < this.getAir() || this.stats.drowningType != 2) {
super.setAir(air);
}
}