Add function for faking blocks while pathing

This commit is contained in:
2021-04-25 21:25:15 +00:00
parent e588c8fa1a
commit 7caa51f011
6 changed files with 34 additions and 29 deletions
+4 -8
View File
@@ -67,11 +67,7 @@ class SleepWithBedStates:
bed = self.beds[0]
print('Chose:', bed)
tmp = c.get_block_at(*bed)
c.set_block_at(*bed, blocks.AIR)
navpath = w.path_to_place(p, bed)
c.set_block_at(*bed, tmp)
navpath = w.path_to_place_faked(p, bed)
print('navpath:', navpath)
if navpath:
@@ -171,12 +167,12 @@ class SleepWithBedStates:
print(threats)
self.g.game.leave_bed()
self.state = self.cleanup
elif self.g.correction_count:
print('Forcefully woke up')
self.state = self.collect_bed
elif self.g.time < 100:
print('Woke up time')
self.state = self.break_bed
elif self.g.correction_count:
print('Woke up by movement')
self.state = self.break_bed
def break_bed(self):
if self.my_bed: