mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
feat: add 4-block jumps, diagonal parkour, high-fall water/ladder support
MoveParkour rewritten to support both cardinal and diagonal sprint jumps with unified (xOff, zOff) interface. New capabilities: - 4-block cardinal sprint jumps with edge-approach timing in template - Diagonal parkour: (2,1), (1,2), (2,2), (3,1), (1,3) in all quadrants - Ascending parkour extended to dist=3 (cardinal) - Overshoot safety check after landing destination - Block parkour from climbable starting blocks (vine/ladder) MoveDescend/MoveFall enhanced with Baritone-style dynamic fall scanning: - Water landing: accepts falls of any height into water - Mid-fall ladder/vine grab: resets effective fall height (<=11 blocks) - CalculationContext gains MaxFallHeightWater, AllowLadderGrabDuringFall SprintJumpTemplate gains distance-based approach timing: - Long jumps (>=3.5 blocks): delays jump until 0.5 blocks from center - Medium jumps (>=2.5): 0.35 blocks approach - Landing tolerance scales with jump distance All movements verified on 1.21.11 local server. Made-with: Cursor
This commit is contained in:
parent
a9c9a6a669
commit
53082d387e
9 changed files with 365 additions and 89 deletions
|
|
@ -49,17 +49,38 @@ namespace MinecraftClient.Pathing.Core
|
|||
|
||||
moves.Add(new MoveFall());
|
||||
|
||||
// Cardinal parkour: 2-4 block sprint jumps along +-X and +-Z
|
||||
foreach (int dx in offsets)
|
||||
{
|
||||
for (int dist = 2; dist <= 4; dist++)
|
||||
moves.Add(new MoveParkour(dx * dist, 0));
|
||||
// Ascending: +1Y, dist 2-3 (dist 4 ascend not physically reliable)
|
||||
for (int dist = 2; dist <= 3; dist++)
|
||||
moves.Add(new MoveParkour(dx, 0, dist));
|
||||
moves.Add(new MoveParkour(dx, 0, 2, yDelta: 1));
|
||||
moves.Add(new MoveParkour(dx * dist, 0, yDelta: 1));
|
||||
}
|
||||
foreach (int dz in offsets)
|
||||
{
|
||||
for (int dist = 2; dist <= 4; dist++)
|
||||
moves.Add(new MoveParkour(0, dz * dist));
|
||||
for (int dist = 2; dist <= 3; dist++)
|
||||
moves.Add(new MoveParkour(0, dz, dist));
|
||||
moves.Add(new MoveParkour(0, dz, 2, yDelta: 1));
|
||||
moves.Add(new MoveParkour(0, dz * dist, yDelta: 1));
|
||||
}
|
||||
|
||||
// Diagonal parkour: sprint jumps at angles.
|
||||
// Only include combinations with actual distance <= ~3.2 blocks (conservative)
|
||||
foreach (int dx in offsets)
|
||||
{
|
||||
foreach (int dz in offsets)
|
||||
{
|
||||
// (2,1)/(1,2): sqrt(5) ~ 2.24 blocks
|
||||
moves.Add(new MoveParkour(dx * 2, dz * 1));
|
||||
moves.Add(new MoveParkour(dx * 1, dz * 2));
|
||||
// (2,2): sqrt(8) ~ 2.83 blocks
|
||||
moves.Add(new MoveParkour(dx * 2, dz * 2));
|
||||
// (3,1)/(1,3): sqrt(10) ~ 3.16 blocks
|
||||
moves.Add(new MoveParkour(dx * 3, dz * 1));
|
||||
moves.Add(new MoveParkour(dx * 1, dz * 3));
|
||||
}
|
||||
}
|
||||
|
||||
return [.. moves];
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ namespace MinecraftClient.Pathing.Core
|
|||
public bool AllowParkourAscend { get; }
|
||||
public bool AllowDiagonalDescend { get; }
|
||||
public int MaxFallHeight { get; }
|
||||
public int MaxFallHeightWater { get; }
|
||||
public bool AllowLadderGrabDuringFall { get; }
|
||||
public double JumpPenalty { get; }
|
||||
public double WalkCost { get; }
|
||||
public double SprintCost { get; }
|
||||
|
|
@ -27,6 +29,8 @@ namespace MinecraftClient.Pathing.Core
|
|||
bool allowParkourAscend = false,
|
||||
bool allowDiagonalDescend = true,
|
||||
int maxFallHeight = 3,
|
||||
int maxFallHeightWater = 256,
|
||||
bool allowLadderGrabDuringFall = true,
|
||||
double jumpPenalty = ActionCosts.JumpPenalty)
|
||||
{
|
||||
World = world;
|
||||
|
|
@ -35,6 +39,8 @@ namespace MinecraftClient.Pathing.Core
|
|||
AllowParkourAscend = allowParkourAscend;
|
||||
AllowDiagonalDescend = allowDiagonalDescend;
|
||||
MaxFallHeight = maxFallHeight;
|
||||
MaxFallHeightWater = maxFallHeightWater;
|
||||
AllowLadderGrabDuringFall = allowLadderGrabDuringFall;
|
||||
JumpPenalty = jumpPenalty;
|
||||
WalkCost = ActionCosts.WalkOneBlock;
|
||||
SprintCost = CanSprint ? ActionCosts.SprintOneBlock : ActionCosts.WalkOneBlock;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue