From 029ef72ea5f781f7f1c9240e830b8ea49ae920d8 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Tue, 22 Dec 2020 05:58:30 +0000 Subject: [PATCH] Grab supplies when doing Filling job --- jobs.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/jobs.py b/jobs.py index ef7517c..42a3ec8 100644 --- a/jobs.py +++ b/jobs.py @@ -857,7 +857,7 @@ class CacheItemsStates: w = self.g.world p = utils.pint(self.g.pos) - self.trapped_chests = w.find_blocks_indexed(p, blocks.TRAPPED_CHEST_IDS, 100) + self.trapped_chests = w.find_blocks_indexed(p, blocks.TRAPPED_CHEST_IDS) print('Found:', self.trapped_chests) self.state = self.choose_trapped_chest @@ -1075,7 +1075,7 @@ class GrabSuppliesStates: w = self.g.world p = utils.pint(self.g.pos) - self.barrels = w.find_blocks_indexed(p, blocks.BARREL_IDS, 100) + self.barrels = w.find_blocks_indexed(p, blocks.BARREL_IDS) print('Found:', self.barrels) self.state = self.choose_barrel @@ -1823,9 +1823,19 @@ class JobStates: def fill_blocks(self): machines = [ + self.grab_supplies_states, self.fill_blocks_states, self.sleep_with_bed_states, ] + self.sleep_with_bed_states.silent = True + + f = self.g.filling + name = blocks.BLOCKS[f.block] + item = items.ITEMS['minecraft:'+name]['protocol_id'] + + self.grab_supplies_states.supplies = { + tuple([item]): 0, + } return machines def stop(self):