Tile field encapsulation

This commit is contained in:
Anuken
2018-07-27 10:52:14 -04:00
parent 23bd9a989b
commit 01f6904f82
7 changed files with 27 additions and 18 deletions
@@ -89,7 +89,7 @@ public class Pathfinder{
}
private boolean passable(Tile tile, Team team){
return (tile.block() == Blocks.air && !tile.floor().isLiquid && tile.cliffs == 0 && !tile.floor().solid && !(tile.floor().isLiquid && (tile.floor().damageTaken > 0 || tile.floor().drownTime > 0)))
return (tile.block() == Blocks.air && !tile.floor().isLiquid && !tile.hasCliffs() && !tile.floor().solid && !(tile.floor().isLiquid && (tile.floor().damageTaken > 0 || tile.floor().drownTime > 0)))
|| (tile.breakable() && (tile.getTeam() != team)) || !tile.solid();
}