1 次代码提交
作者 SHA1 备注 提交日期
Lyizai 64e47e7781 fix: v1.0.5 修复水上持续跳跃干扰寻路
- 自动游泳仅在玩家完全没入水中(isSubmergedInWater)时触发跳跃
- 玩家在水面上正常游泳时不再干预,避免干扰 Baritone 水平寻路
- 版本号更新为 1.0.5
2026-08-17 07:02:22 +00:00
共修改 3 个文件,包含 7 行新增和 8 行删除
+2 -2
查看文件
@@ -14,7 +14,7 @@
## 安装
1. 安装 Fabric Loader 0.16.14+ 和 Fabric API
2. 将 `autostore-1.0.4.jar` 放入 `.minecraft/mods/` 目录
2. 将 `autostore-1.0.5.jar` 放入 `.minecraft/mods/` 目录
3. 启动游戏,按 `Ctrl+R` 打开 GUI
## 构建
@@ -24,4 +24,4 @@
./build_mod.sh
```
输出文件:`autostore-1.0.4.jar`
输出文件:`autostore-1.0.5.jar`
@@ -502,7 +502,8 @@ implements SubtitleChatMonitor.Listener {
/**
* 自动游泳逻辑(每帧调用):
* 玩家处于水中且未站在地面上时自动跳跃(模拟按住空格键),防止溺水。
* 仅在玩家完全没入水中(有溺水风险)时自动跳跃,保持浮在水面。
* 玩家在水面上正常游泳时不做任何干预,避免干扰 Baritone 的水平寻路。
*/
private void tickAutoSwim(MinecraftClient client) {
if (!this.isRunning()) {
@@ -512,10 +513,8 @@ implements SubtitleChatMonitor.Listener {
if (player == null) {
return;
}
// 完全没入水中,或接触水面且未站在地面(深水区漂浮)时都需要游泳
boolean inWater = player.isSubmergedInWater()
|| (player.isTouchingWater() && !player.isOnGround());
if (inWater) {
// 只有完全没入水中(头部在水面以下)才有溺水风险,此时才需要跳跃上浮
if (player.isSubmergedInWater()) {
player.jump();
}
}
+1 -1
查看文件
@@ -1 +1 @@
{"schemaVersion":1,"id":"autostore","version":"1.0.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.0.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"}]}