Improve finding sand by using slices
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user