Consolidate bot runtime on Minecraft 26.3

This commit is contained in:
Tanner
2026-11-04 03:05:23 +00:00
parent b6f7ce9948
commit f7f58f5d07
15 changed files with 706 additions and 537 deletions
+20 -1
View File
@@ -55,7 +55,7 @@ for module in [
importlib.reload(module)
class JobStates:
class LegacyJobStates:
def idle(self):
return []
@@ -262,3 +262,22 @@ class JobStates:
def tick(self):
self.run_machines(self.state())
class JobStates(LegacyJobStates):
"""26.3 job facade; crop gathering is the currently migrated job."""
def __init__(self, global_state):
self.g = global_state
self.gather_crop_states = gather_crop.GatherCropStates(global_state)
self.state = self.idle
def farm_crop(self):
return [self.gather_crop_states]
def stop(self):
if self.g.get('breaking'):
self.g.game.cancel_break()
self.g.path = []
self.g.look_at = None
self.gather_crop_states.state = self.gather_crop_states.idle
self.state = self.idle