Evade ranged weapons and rush target

This commit is contained in:
Tanner committed 2026-11-17 23:45:21 +00:00
1 parent dbd2831dda
commit 0722924263
10 files changed
+474 -14

No files matched your search

+5 -2
View File
@@ -294,8 +294,9 @@ def tick(global_state):
if d.length() > 0:
if g.y_v < 5:
p.x -= utils.cap(d.x, 0.2)
p.z -= utils.cap(d.z, 0.2)
horizontal_step = 0.28 if g.get('sprinting', False) else 0.2
p.x -= utils.cap(d.x, horizontal_step)
p.z -= utils.cap(d.z, horizontal_step)
if len(g.path) > 1 and d.length() < 0.2:
# removes some jitter in walking
@@ -501,6 +502,7 @@ def start_automation(global_state, initialize=True):
g.protocol_version = 777
if initialize:
g.time = 0.0
g.sprinting = False
g.time_base = None
g.time_update_received_at = None
g.clock_rate = 1.0
@@ -554,6 +556,7 @@ def start_automation(global_state, initialize=True):
# Preserve active work during hot reloads, but give the worker all fields
# introduced by the currently migrated inventory controls.
g.setdefault('sprinting', False)
g.setdefault('draining', False)
g.setdefault('dumping', None)
g.setdefault('dump_waiting', None)