Fix randomWaveAI causing units to target untargetable blocks (#10870)
* Update Pathfinder.java * Update FlyingAI.java
This commit is contained in:
@@ -540,7 +540,7 @@ public class Pathfinder implements Runnable{
|
||||
if(!targets.isEmpty()){
|
||||
boolean any = false;
|
||||
for(Building other : targets){
|
||||
if((other.items != null && other.items.any()) || other.status() != BlockStatus.noInput){
|
||||
if(((other.items != null && other.items.any()) || other.status() != BlockStatus.noInput) && other.block.targetable){
|
||||
out.add(other.tile.array());
|
||||
any = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user