fix: v1.0.5 修复水上持续跳跃干扰寻路
- 自动游泳仅在玩家完全没入水中(isSubmergedInWater)时触发跳跃 - 玩家在水面上正常游泳时不再干预,避免干扰 Baritone 水平寻路 - 版本号更新为 1.0.5
这个提交包含在:
@@ -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 @@
|
||||
{"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"}]}
|
||||
在新工单中引用
屏蔽一个用户