fix(runtime/actions): require horizontal escape movement

This commit is contained in:
2026-05-26 12:45:13 +03:00
parent 6ba6bcdbb7
commit 36e547a896
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -187,12 +187,12 @@ async function escapePit(bot, maxSteps = 3) {
}
// Let jump physics settle before deciding whether escape-pit worked.
// A mid-jump Y delta is not freedom; require horizontal movement or a
// sustained one-block climb before reporting success.
// Vertical-only motion is not freedom from a wedged shaft; require real
// horizontal movement, otherwise fall through to the tunnel-out skill.
await new Promise((r) => setTimeout(r, 500));
const moved = horizontalDistance(before, bot.entity.position);
const climbed = verticalGain(before, bot.entity.position);
if (moved >= 0.75 || climbed >= 0.9) {
if (moved >= 0.75) {
return {
ok: true,
code: "done",