mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 21:17:32 +00:00
Slightly improved return to start checks
This commit is contained in:
1 parent
85a1892c71
commit
a2dd0e502a
1 file changed
+5
-1
@@ -30,11 +30,15 @@ public class EntityAIReturn extends EntityAIBase
|
||||
* Returns whether the EntityAIBase should begin execution.
|
||||
*/
|
||||
public boolean shouldExecute() {
|
||||
if (!npc.ai.returnToStart){
|
||||
return false;
|
||||
}
|
||||
|
||||
if (npc.getNavigator().noPath() || (!npc.isAttacking() && wasAttacked)){
|
||||
return true;
|
||||
}
|
||||
|
||||
if(npc.hasOwner() || !npc.ai.returnToStart || npc.isKilled() || npc.isInteracting()){
|
||||
if(npc.hasOwner() || npc.isKilled() || npc.isInteracting()){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user