mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 06:07:27 +00:00
EntityNPCInterface:
-Fixed looping error in setAir() and updateAITasks()
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user