Fix jobstate bugs

This commit is contained in:
2020-09-16 19:12:01 -06:00
parent c30ac5aefc
commit 58458a561f
4 changed files with 78 additions and 39 deletions

7
bot.py
View File

@@ -32,6 +32,8 @@ import utils
importlib.reload(utils)
import path
importlib.reload(path)
import jobs
importlib.reload(jobs)
last_tick = time.time()
@@ -133,6 +135,7 @@ def tick(global_state):
g.connection.write_packet(packet, force=True)
g.game.tick()
g.job.tick()
def init(global_state):
@@ -150,8 +153,7 @@ def init(global_state):
g.breaking = None
g.break_time = 0
#g.jobstate = JobStates(connection, player_info)
#g.jobstate.run()
g.job = jobs.JobStates(g)
def bot(global_state):
g = global_state
@@ -191,6 +193,7 @@ def bot(global_state):
print('Chunks loaded.')
init(g)
print('Initialized.')
while g.running:
tick(g)