Don't search so hard for nether wart

This commit is contained in:
Tanner Collin 2020-12-15 06:37:53 +00:00
parent 6c9f228862
commit 6d62c07428

View File

@ -129,16 +129,15 @@ class GatherWartStates:
return None return None
def init(self): def init(self):
self.g.chopped_tree = False
self.state = self.find_new_wart self.state = self.find_new_wart
def find_new_wart(self): def find_new_wart(self):
print('Finding new tree...') print('Finding new wart...')
w = self.g.world w = self.g.world
p = utils.pint(self.g.pos) p = utils.pint(self.g.pos)
mature_wart = max(blocks.NETHERWART_IDS) mature_wart = max(blocks.NETHERWART_IDS)
for wart in w.find_blocks_3d(p, [mature_wart], 100): for wart in w.find_blocks_3d(p, [mature_wart], 50, 20):
print('Found wart:', wart) print('Found wart:', wart)
if wart not in self.bad_warts: if wart not in self.bad_warts:
break break
@ -1369,9 +1368,10 @@ class FillBlocksStates:
def check_obstruction(self): def check_obstruction(self):
p = utils.pint(self.g.pos) p = utils.pint(self.g.pos)
f = self.g.filling
print('last', self.last_block) print('last', self.last_block)
print('p', p) print('p', p)
if self.last_block[1] >= p[1]: if self.last_block[1] >= p[1] and f.block not in blocks.NON_SOLID_IDS:
print('Obstructed, going to last block') print('Obstructed, going to last block')
self.state = self.nav_to_last_block self.state = self.nav_to_last_block
else: else: