Fix more sand bugs
This commit is contained in:
@@ -93,7 +93,7 @@ class MCWorld:
|
||||
try:
|
||||
s = maze_solver.astar(start, place)
|
||||
return list(s) if s else None
|
||||
except AStarTimeout:
|
||||
except path.AStarTimeout:
|
||||
return None
|
||||
|
||||
def find_bed_areas(self, center, distance):
|
||||
@@ -131,7 +131,7 @@ class MCWorld:
|
||||
sand = []
|
||||
for i in range(10):
|
||||
check = utils.padd(center, utils.alternate(i, 1))
|
||||
sand.extend(self.find_blocks(check, distance, [66], 20))
|
||||
sand.extend(self.find_blocks(check, distance, [blocks.SAND], 20))
|
||||
|
||||
safe_sand = []
|
||||
for s in sand:
|
||||
@@ -195,7 +195,7 @@ class Game:
|
||||
if solution:
|
||||
solution = list(solution)
|
||||
self.g.path = solution
|
||||
#g.jobstate.state = self.g.jobstate.stop
|
||||
self.g.job.state = self.g.job.stop
|
||||
print(len(solution))
|
||||
print(solution)
|
||||
print(round(time.time() - start, 3), 'seconds')
|
||||
@@ -284,7 +284,6 @@ class Game:
|
||||
self.g.job.state = self.g.job.stop
|
||||
reply = 'ok'
|
||||
|
||||
|
||||
if command == 'inv':
|
||||
for i in self.g.inv.values():
|
||||
if i.present:
|
||||
|
||||
Reference in New Issue
Block a user