Grab supplies when doing Filling job

master
Tanner Collin 3 years ago
parent 376bc8073c
commit 029ef72ea5
  1. 14
      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):

Loading…
Cancel
Save