mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
feat: add transition-aware path execution braking
This commit is contained in:
parent
945eae958a
commit
3b4e552d70
23 changed files with 837 additions and 108 deletions
|
|
@ -35,7 +35,7 @@ namespace MinecraftClient.Pathing.Execution
|
|||
{
|
||||
_goal = goal;
|
||||
_replanCount = 0;
|
||||
var segments = PathSegment.FromPath(result.Path);
|
||||
var segments = PathSegmentBuilder.FromPath(result.Path);
|
||||
_executor = new PathExecutor(segments, _debugLog);
|
||||
_infoLog?.Invoke($"[PathMgr] Navigation started: {segments.Count} segments");
|
||||
}
|
||||
|
|
@ -45,7 +45,7 @@ namespace MinecraftClient.Pathing.Execution
|
|||
if (_executor is null)
|
||||
return;
|
||||
|
||||
var state = _executor.Tick(pos, physics, input);
|
||||
var state = _executor.Tick(pos, physics, input, world);
|
||||
|
||||
switch (state)
|
||||
{
|
||||
|
|
@ -113,7 +113,7 @@ namespace MinecraftClient.Pathing.Execution
|
|||
return;
|
||||
}
|
||||
|
||||
var segments = PathSegment.FromPath(result.Path);
|
||||
var segments = PathSegmentBuilder.FromPath(result.Path);
|
||||
_executor = new PathExecutor(segments, _debugLog);
|
||||
_infoLog?.Invoke($"[PathMgr] Replanned: {segments.Count} segments (replan #{_replanCount})");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue