Improve finding sand by using slices

This commit is contained in:
2020-12-02 05:16:46 +00:00
parent eabb0a04d1
commit b7295b4beb
4 changed files with 195 additions and 39 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ class Pathfinder(AStar):
@functools.lru_cache(maxsize=BLOCK_CACHE_SIZE)
def bavoid(self, p):
return self.chunks.get_block_at(*p) in blocks.AVOID_IDS
return self.chunks.get_block_at(*p) in blocks.AVOID_IDS or p[1] < 0
def check_traverse(self, node, offset):
dest = utils.padd(node, offset)