Grab supplies when doing Filling job
This commit is contained in:
parent
376bc8073c
commit
029ef72ea5
14
jobs.py
14
jobs.py
|
@ -857,7 +857,7 @@ class CacheItemsStates:
|
||||||
w = self.g.world
|
w = self.g.world
|
||||||
p = utils.pint(self.g.pos)
|
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)
|
print('Found:', self.trapped_chests)
|
||||||
self.state = self.choose_trapped_chest
|
self.state = self.choose_trapped_chest
|
||||||
|
|
||||||
|
@ -1075,7 +1075,7 @@ class GrabSuppliesStates:
|
||||||
w = self.g.world
|
w = self.g.world
|
||||||
p = utils.pint(self.g.pos)
|
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)
|
print('Found:', self.barrels)
|
||||||
self.state = self.choose_barrel
|
self.state = self.choose_barrel
|
||||||
|
|
||||||
|
@ -1823,9 +1823,19 @@ class JobStates:
|
||||||
|
|
||||||
def fill_blocks(self):
|
def fill_blocks(self):
|
||||||
machines = [
|
machines = [
|
||||||
|
self.grab_supplies_states,
|
||||||
self.fill_blocks_states,
|
self.fill_blocks_states,
|
||||||
self.sleep_with_bed_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
|
return machines
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user