比较提交
| 作者 | SHA1 | 提交日期 | |
|---|---|---|---|
|
|
d0ed839d9f | ||
|
|
20c9cb10a3 |
@@ -7,7 +7,8 @@
|
||||
- 从远程 `markers.json` 拉取各国领土边界
|
||||
- 四种扩地策略:方形外扩、区域扩地、玩家周围、绕国一圈
|
||||
- 区域扩地采用 S 形扫描:从与现有领土接壤的区块开始,横向/纵向 S 形扫过整个矩形,不沿邦国边界,但保证每个新占领区块都与已占领领土接壤
|
||||
- 自动寻路(Baritone)前往目标区块
|
||||
- 自动寻路(Baritone)前往目标区块,寻路优先走地面减少走入矿洞,超时自动 `/u return` 回城自救
|
||||
- 目标有效性校验:寻路/等待/重试前实时校验目标是否仍与己方领土接壤,不接壤立即跳过并重新规划
|
||||
- 自动进食(饥饿时自动吃背包食物)
|
||||
- 实时地图 GUI(通过 Ctrl+R 打开)
|
||||
- 监听聊天/字幕消息判断开垦结果
|
||||
@@ -15,7 +16,7 @@
|
||||
## 安装
|
||||
|
||||
1. 安装 Fabric Loader 0.16.14+ 和 Fabric API
|
||||
2. 将 `autostore-1.1.3.jar` 放入 `.minecraft/mods/` 目录
|
||||
2. 将 `autostore-1.1.5.jar` 放入 `.minecraft/mods/` 目录
|
||||
3. 启动游戏,按 `Ctrl+R` 打开 GUI
|
||||
|
||||
## 构建
|
||||
@@ -25,4 +26,4 @@
|
||||
./build_mod.sh
|
||||
```
|
||||
|
||||
输出文件:`autostore-1.1.3.jar`
|
||||
输出文件:`autostore-1.1.5.jar`
|
||||
|
||||
@@ -400,9 +400,20 @@ implements SubtitleChatMonitor.Listener {
|
||||
}
|
||||
HashSet<ChunkPos> own = new HashSet<ChunkPos>(m.sessionClaims());
|
||||
TerritoryState self = m.selfState();
|
||||
// Fallback:如果当前刷新后的模型找不到己方邦国,使用启动/规划时缓存的模型
|
||||
// 启动检查成功说明邦国一定存在,fallback 解决竞态/刷新导致的 self 暂时性 null,避免所有目标被跳过
|
||||
if (self == null && this.model != null) {
|
||||
self = this.model.selfState();
|
||||
}
|
||||
if (self != null) {
|
||||
own.addAll(self.chunks());
|
||||
}
|
||||
// 己方领土数据暂时不可用时保守视为有效,避免所有目标被误跳过导致玩家原地不动;
|
||||
// 规划器生成目标时己方领土必然非空,此处 own 为空仅可能是刷新竞态,放行让寻路继续
|
||||
if (own.isEmpty()) {
|
||||
this.log("警告:己方领土数据暂时为空,保守放行目标 " + this.target.x() + "," + this.target.z());
|
||||
return true;
|
||||
}
|
||||
return this.ownNeighbors(this.target, own) > 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"schemaVersion":1,"id":"autostore","version":"1.1.4","name":"AutoStore","description":"","authors":[],"contact":{},"license":"All-Rights-Reserved","environment":"client","entrypoints":{"fabric-datagen":["autostore.client.AutoStoreModDataGenerator"],"client":["autostore.client.AutoStoreModClient"],"main":["autostore.AutoStoreMod"]},"mixins":["autostore.mixins.json",{"config":"autostore.client.mixins.json","environment":"client"}],"depends":{"fabricloader":">=0.16.14","fabric-api":"*","minecraft":"1.21.4"},"jars":[{"file":"META-INF/jars/baritone-api-fabric-1.13.1.jar"}]}
|
||||
{"schemaVersion":1,"id":"autostore","version":"1.1.5","name":"AutoStore","description":"","authors":[],"contact":{},"license":"All-Rights-Reserved","environment":"client","entrypoints":{"fabric-datagen":["autostore.client.AutoStoreModDataGenerator"],"client":["autostore.client.AutoStoreModClient"],"main":["autostore.AutoStoreMod"]},"mixins":["autostore.mixins.json",{"config":"autostore.client.mixins.json","environment":"client"}],"depends":{"fabricloader":">=0.16.14","fabric-api":"*","minecraft":"1.21.4"},"jars":[{"file":"META-INF/jars/baritone-api-fabric-1.13.1.jar"}]}
|
||||
在新工单中引用
屏蔽一个用户