v1.2.5: 高度偏好寻路(优先往高处走) + 寻路/重试前校验目标接壤 + 超时先走两步再传送
- 新增 GoalXZAltitude 寻路目标:启发式成本 = 水平距离 - 高度权重×y,y 越大优先级越高、y 越小施惩罚,引导寻路优先走高 - ExpansionConfig 新增 altitudePreference/altitudeWeight 配置(默认开/0.1),BaritoneBridge 按配置选择原生 GoalXZ 或高度偏好 Goal - 寻路/重试前先检查目标区块是否仍与己方领土接壤(startPathing/retrySameTarget),不接壤立即跳过 - 寻路超时不再直接传送:重试耗尽后先往边上走两步自救(每轮重试原目标,最多 sideStepMaxRounds=3 轮),多轮无效才按连续超时阈值回城或切换目标
这个提交包含在:
@@ -37,6 +37,9 @@ public class ExpansionConfig {
|
||||
/** 发送 /u return 后等待传送完成的时间(秒);默认 12 秒,覆盖 10 秒传送延迟并留余量 */
|
||||
public int returnWaitSeconds = 12;
|
||||
|
||||
/** 单个目标最多触发"往边上走两步"自救的轮数;每轮走两步后仍超时再重试,多轮无效后才回城/切换目标(默认 3) */
|
||||
public int sideStepMaxRounds = 3;
|
||||
|
||||
/** 区域扩地策略的中心 X 坐标(区块) */
|
||||
public int regionCenterX;
|
||||
|
||||
@@ -73,6 +76,12 @@ public class ExpansionConfig {
|
||||
/** 是否允许 Baritone 放置方块 */
|
||||
public boolean allowPlace;
|
||||
|
||||
/** 寻路高度偏好:true 时寻路优先往高处走(y 越大启发成本越低/优先级越高,y 越小施惩罚) */
|
||||
public boolean altitudePreference = true;
|
||||
|
||||
/** 高度偏好权重:每上升 1 格折算的启发成本减少量(越大越明显偏向高处,默认 0.1) */
|
||||
public double altitudeWeight = 0.1;
|
||||
|
||||
/** 是否启用避开怪物 */
|
||||
public boolean avoidMobs = true;
|
||||
|
||||
@@ -102,6 +111,7 @@ public class ExpansionConfig {
|
||||
c.retries = this.retries;
|
||||
c.returnThresholdSeconds = this.returnThresholdSeconds;
|
||||
c.returnWaitSeconds = this.returnWaitSeconds;
|
||||
c.sideStepMaxRounds = this.sideStepMaxRounds;
|
||||
c.regionCenterX = this.regionCenterX;
|
||||
c.regionCenterZ = this.regionCenterZ;
|
||||
c.regionRadius = this.regionRadius;
|
||||
@@ -114,6 +124,8 @@ public class ExpansionConfig {
|
||||
c.allowJump = this.allowJump;
|
||||
c.allowBreak = this.allowBreak;
|
||||
c.allowPlace = this.allowPlace;
|
||||
c.altitudePreference = this.altitudePreference;
|
||||
c.altitudeWeight = this.altitudeWeight;
|
||||
c.avoidMobs = this.avoidMobs;
|
||||
c.autoEat = this.autoEat;
|
||||
c.eatThreshold = this.eatThreshold;
|
||||
|
||||
在新工单中引用
屏蔽一个用户