比较提交
| 作者 | SHA1 | 提交日期 | |
|---|---|---|---|
|
|
e8f6009a66 | ||
|
|
8a2c4a21d8 | ||
|
|
134a6e6f20 |
@@ -15,7 +15,7 @@
|
||||
## 安装
|
||||
|
||||
1. 安装 Fabric Loader 0.16.14+ 和 Fabric API
|
||||
2. 将 `autostore-1.1.1.jar` 放入 `.minecraft/mods/` 目录
|
||||
2. 将 `autostore-1.1.3.jar` 放入 `.minecraft/mods/` 目录
|
||||
3. 启动游戏,按 `Ctrl+R` 打开 GUI
|
||||
|
||||
## 构建
|
||||
@@ -25,4 +25,4 @@
|
||||
./build_mod.sh
|
||||
```
|
||||
|
||||
输出文件:`autostore-1.1.1.jar`
|
||||
输出文件:`autostore-1.1.3.jar`
|
||||
|
||||
@@ -13,6 +13,7 @@ import autostore.client.config.ExpansionConfig;
|
||||
import autostore.client.territory.ChunkPos;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
|
||||
/**
|
||||
* Baritone API 封装(桥接层)。
|
||||
@@ -36,6 +37,12 @@ public final class BaritoneBridge {
|
||||
settings.allowPlace.value = config.allowPlace;
|
||||
settings.allowParkour.value = config.allowJump;
|
||||
settings.avoidance.value = config.avoidMobs;
|
||||
// 减少走入地下矿洞:限制无水源时的下落高度,避免掉进深坑/矿洞。
|
||||
// 放宽到 10 格,仍允许穿越峡谷、下坡等正常地形,同时避免掉入深坑
|
||||
settings.maxFallHeightNoWater.value = 10;
|
||||
// 轻微提高挖掘方块的额外代价,让寻路尽量绕行地面而非挖洞穿山,
|
||||
// 但不会阻止必要挖掘(高山、峡谷等仍可通行)
|
||||
settings.blockBreakAdditionalPenalty.value = 0.5;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,6 +69,18 @@ public final class BaritoneBridge {
|
||||
baritone.getPathingBehavior().forceCancel();
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送服务器聊天命令(如 /u return 回城),command 参数不含前导斜杠。
|
||||
* 用于寻路超时后的回城自救,避免玩家被困在地下矿洞等位置。
|
||||
*/
|
||||
public void sendCommand(String command) {
|
||||
MinecraftClient client = MinecraftClient.getInstance();
|
||||
if (client == null || client.player == null || client.getNetworkHandler() == null) {
|
||||
return;
|
||||
}
|
||||
client.getNetworkHandler().sendChatCommand(command);
|
||||
}
|
||||
|
||||
/** @return 当前是否正在寻路 */
|
||||
public boolean isPathing() {
|
||||
IBaritone baritone = this.primary();
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
@@ -76,6 +77,8 @@ implements SubtitleChatMonitor.Listener {
|
||||
private final Set<ChunkPos> claimedSet = new HashSet<>();
|
||||
/** 是否正在自动进食 */
|
||||
private boolean eating;
|
||||
/** 回城自救后重新规划时保留重试计数,避免无限循环 */
|
||||
private boolean keepRetryCount;
|
||||
|
||||
public ExpansionController(TerritoryDataService dataService) {
|
||||
this.dataService = dataService;
|
||||
@@ -230,6 +233,10 @@ implements SubtitleChatMonitor.Listener {
|
||||
this.tickNext();
|
||||
break;
|
||||
}
|
||||
case 9: {
|
||||
this.tickReturning();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,7 +275,10 @@ implements SubtitleChatMonitor.Listener {
|
||||
|
||||
/** 让 Baritone 寻路前往当前目标区块,并进入 PATHING 状态 */
|
||||
private void startPathing() {
|
||||
if (!this.keepRetryCount) {
|
||||
this.retryCount = 0;
|
||||
}
|
||||
this.keepRetryCount = false;
|
||||
this.stageStartedMillis = System.currentTimeMillis();
|
||||
this.lastProgress = 0;
|
||||
this.baritoneBridge.pathTo(this.target);
|
||||
@@ -284,8 +294,8 @@ implements SubtitleChatMonitor.Listener {
|
||||
this.setState(State.NEXT, "\u76ee\u6807\u4e3a\u7a7a");
|
||||
return;
|
||||
}
|
||||
// 目标已被他人占领(地图刷新后发现):立即跳过,避免继续寻路到无效区块
|
||||
if (this.skipIfTargetClaimed("\u76ee\u6807\u5df2\u88ab\u5360\u9886")) {
|
||||
// 目标已失效(被占领或不再与己方领土接壤):立即跳过,避免继续寻路到无效区块
|
||||
if (this.skipIfTargetInvalid()) {
|
||||
return;
|
||||
}
|
||||
if (this.playerChunk.equals(this.target)) {
|
||||
@@ -302,6 +312,10 @@ implements SubtitleChatMonitor.Listener {
|
||||
if (this.retryCount >= this.config.retries) {
|
||||
this.log("\u5bfb\u8def\u8d85\u65f6\uff0c\u8df3\u8fc7 " + this.target.x() + "," + this.target.z());
|
||||
this.setState(State.FAIL, "\u5bfb\u8def\u8d85\u65f6");
|
||||
} else if (this.isUnderground()) {
|
||||
// 玩家被困地下(矿洞等):执行 /u return 回城自救,避免被困
|
||||
this.log("\u5bfb\u8def\u8d85\u65f6\u4e14\u73a9\u5bb6\u5728\u5730\u4e0b\uff0c\u6267\u884c /u return \u56de\u57ce\u81ea\u6551 " + this.retryCount + "/" + this.config.retries);
|
||||
this.returnToCapital("\u56de\u57ce\u540e\u91cd\u65b0\u5bfb\u8def " + this.target.x() + "," + this.target.z());
|
||||
} else {
|
||||
this.log("\u5bfb\u8def\u8d85\u65f6\uff0c\u91cd\u8bd5 " + this.retryCount + "/" + this.config.retries);
|
||||
this.retrySameTarget("\u91cd\u8bd5\u524d\u5f80 " + this.target.x() + "," + this.target.z());
|
||||
@@ -315,8 +329,8 @@ implements SubtitleChatMonitor.Listener {
|
||||
this.setState(State.NEXT, "\u76ee\u6807\u4e3a\u7a7a");
|
||||
return;
|
||||
}
|
||||
// 目标已被他人占领(地图刷新后发现):立即跳过,避免被困在已占领区块
|
||||
if (this.skipIfTargetClaimed("\u76ee\u6807\u5df2\u88ab\u5360\u9886")) {
|
||||
// 目标已失效(被占领或不再与己方领土接壤):立即跳过,避免被困在无效区块
|
||||
if (this.skipIfTargetInvalid()) {
|
||||
return;
|
||||
}
|
||||
// 玩家离开了目标区块(被击退/寻路偏差),重新寻路回去
|
||||
@@ -341,8 +355,9 @@ implements SubtitleChatMonitor.Listener {
|
||||
|
||||
/** 重试当前目标:取消旧寻路,重新让 Baritone 前往同一目标区块 */
|
||||
private void retrySameTarget(String statusText) {
|
||||
// 目标已被他人占领(地图刷新后发现):不再重试,直接跳过,避免玩家被困在已占领区块
|
||||
if (this.skipIfTargetClaimed("\u91cd\u8bd5\u65f6\u53d1\u73b0\u76ee\u6807\u5df2\u88ab\u5360\u9886")) {
|
||||
// 目标已失效(被占领或不再与己方领土接壤):不再重试,直接跳过,
|
||||
// 避免玩家被反复拉回与领土不接壤的孤立区块
|
||||
if (this.skipIfTargetInvalid()) {
|
||||
return;
|
||||
}
|
||||
this.baritoneBridge.cancel();
|
||||
@@ -352,19 +367,119 @@ implements SubtitleChatMonitor.Listener {
|
||||
}
|
||||
|
||||
/**
|
||||
* 若当前目标区块已被任何邦国占领(含己方与本次会话),
|
||||
* 则记录日志、跳过该目标并进入 NEXT 状态,返回 true。
|
||||
* 用于在地图数据异步刷新后及时识别"已被占领"的区块,避免死循环。
|
||||
* 若当前目标已失效(被其他邦国占领,或不再与己方领土接壤),
|
||||
* 则取消寻路、记录日志、跳过该目标并进入 NEXT 状态,返回 true。
|
||||
* 用于修复"寻路走到与领土不接壤区块后死等"的 bug:
|
||||
* 地图数据刷新后,若目标周围被他人占领导致不再接壤,立即放弃该目标并重新规划。
|
||||
*/
|
||||
private boolean skipIfTargetClaimed(String reason) {
|
||||
if (this.target != null && this.isClaimedByOthers(this.target)) {
|
||||
this.log(reason + " " + this.target.x() + "," + this.target.z() + "\uff0c\u8df3\u8fc7");
|
||||
this.setState(State.NEXT, "\u8df3\u8fc7\u5df2\u5360\u9886\u533a\u5757");
|
||||
private boolean skipIfTargetInvalid() {
|
||||
if (this.target == null) {
|
||||
return false;
|
||||
}
|
||||
if (!this.isTargetStillValid()) {
|
||||
this.baritoneBridge.cancel();
|
||||
this.log("\u76ee\u6807\u5df2\u5931\u6548\uff08\u88ab\u5360\u9886\u6216\u4e0d\u518d\u4e0e\u9886\u571f\u63a5\u58e4\uff09\uff0c\u8df3\u8fc7 " + this.target.x() + "," + this.target.z());
|
||||
this.setState(State.NEXT, "\u76ee\u6807\u5931\u6548\uff0c\u91cd\u65b0\u89c4\u5212");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断当前目标是否仍然有效:
|
||||
* 未被任何邦国占领,且与己方领土(含本次会话新占领)至少一个区块接壤。
|
||||
* 使用实时地图数据校验,避免寻路到与领土不接壤的孤立区块。
|
||||
*/
|
||||
private boolean isTargetStillValid() {
|
||||
if (this.target == null) {
|
||||
return false;
|
||||
}
|
||||
TerritoryModel m = this.dataService.model();
|
||||
if (m.allClaimedChunks().contains(this.target)) {
|
||||
return false;
|
||||
}
|
||||
HashSet<ChunkPos> own = new HashSet<ChunkPos>(m.sessionClaims());
|
||||
TerritoryState self = m.selfState();
|
||||
if (self != null) {
|
||||
own.addAll(self.chunks());
|
||||
}
|
||||
return this.ownNeighbors(this.target, own) > 0;
|
||||
}
|
||||
|
||||
/** 统计区块周围(上下左右)属于给定集合的邻居数量 */
|
||||
private int ownNeighbors(ChunkPos chunk, Set<ChunkPos> own) {
|
||||
int count = 0;
|
||||
for (ChunkPos neighbor : this.cardinalNeighbors(chunk)) {
|
||||
if (own.contains(neighbor)) {
|
||||
++count;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
/** 判断区块是否属于己方领土(含本次会话新占领) */
|
||||
private boolean isInOwnTerritory(ChunkPos chunk) {
|
||||
TerritoryModel m = this.dataService.model();
|
||||
if (m.sessionClaims().contains(chunk)) {
|
||||
return true;
|
||||
}
|
||||
TerritoryState self = m.selfState();
|
||||
return self != null && self.chunks().contains(chunk);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断玩家是否被困在地下(头顶上方连续数格被实心方块遮挡)。
|
||||
* 用于寻路超时时识别"走进矿洞"的情况,从而触发回城自救。
|
||||
*/
|
||||
private boolean isUnderground() {
|
||||
MinecraftClient client = MinecraftClient.getInstance();
|
||||
if (client == null || client.player == null || client.world == null) {
|
||||
return false;
|
||||
}
|
||||
BlockPos pos = client.player.getBlockPos();
|
||||
for (int y = pos.getY() + 1; y <= pos.getY() + 3; ++y) {
|
||||
BlockPos above = new BlockPos(pos.getX(), y, pos.getZ());
|
||||
BlockState state = client.world.getBlockState(above);
|
||||
if (state.isOpaqueFullCube()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 回城自救:取消当前寻路,发送 /u return 命令回到国家王城区块,
|
||||
* 并进入 RETURNING 状态等待回城完成后重新规划扩地任务。
|
||||
* 用于避免玩家被困在地下矿洞或无效区块。
|
||||
*/
|
||||
private void returnToCapital(String statusText) {
|
||||
this.baritoneBridge.cancel();
|
||||
this.stageStartedMillis = System.currentTimeMillis();
|
||||
this.keepRetryCount = true;
|
||||
this.baritoneBridge.sendCommand("u return");
|
||||
this.setState(State.RETURNING, "\u56de\u57ce\u81ea\u6551\u4e2d");
|
||||
this.log("\u6267\u884c /u return \u56de\u57ce\uff0c\u7b49\u5f85\u8fd4\u56de\u738b\u57ce\u540e\u7ee7\u7eed");
|
||||
}
|
||||
|
||||
/**
|
||||
* 回城阶段每帧逻辑:等待玩家回到己方领土(含王城)后重新规划。
|
||||
* /u return 传送需要约 10 秒,因此前 10 秒不检查位置,避免传送未完成就误判;
|
||||
* 若等待超时(60 秒)仍未回到领土,则跳过当前目标继续,避免死等。
|
||||
*/
|
||||
private void tickReturning() {
|
||||
long elapsedSeconds = (System.currentTimeMillis() - this.stageStartedMillis) / 1000L;
|
||||
if (elapsedSeconds >= 60) {
|
||||
this.log("\u56de\u57ce\u7b49\u5f85\u8d85\u65f6\uff0c\u8df3\u8fc7\u5f53\u524d\u76ee\u6807\u7ee7\u7eed");
|
||||
this.setState(State.FAIL, "\u56de\u57ce\u8d85\u65f6\uff0c\u8df3\u8fc7\u76ee\u6807");
|
||||
return;
|
||||
}
|
||||
// /u return 传送约需 10 秒,等待传送完成后才检查是否回到己方领土
|
||||
if (elapsedSeconds >= 10 && this.isInOwnTerritory(this.playerChunk)) {
|
||||
this.log("\u5df2\u56de\u5230\u5df1\u65b9\u9886\u571f\uff0c\u91cd\u65b0\u89c4\u5212\u6269\u5730\u4efb\u52a1");
|
||||
this.setState(State.NEXT, "\u5df2\u56de\u57ce\uff0c\u91cd\u65b0\u89c4\u5212");
|
||||
}
|
||||
}
|
||||
|
||||
/** 成功后的过渡:进入 NEXT 状态,准备处理下一个目标 */
|
||||
private void tickSuccess() {
|
||||
this.setState(State.NEXT, "\u5df2\u5b8c\u6210 " + this.completedClaims + (this.config.targetCount > 0 ? "/" + this.config.targetCount : "/\u6301\u7eed"));
|
||||
@@ -630,7 +745,8 @@ implements SubtitleChatMonitor.Listener {
|
||||
FAIL,
|
||||
NEXT,
|
||||
COMPLETE,
|
||||
STOPPED;
|
||||
STOPPED,
|
||||
RETURNING;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.client.font.TextRenderer;
|
||||
@@ -38,6 +39,9 @@ import net.minecraft.text.StringVisitable;
|
||||
*/
|
||||
public final class AutoStoreGui
|
||||
extends Screen {
|
||||
// ---- 外部链接 ----
|
||||
private static final String GIT_REPO_URL = "https://git.bgjq.top/Lyizai/AutoStore/";
|
||||
private static final String HOMEPAGE_URL = "https://8w.bgjq.top/";
|
||||
private final AutoStoreModClient mod;
|
||||
private final ExpansionConfig config;
|
||||
private final ExpansionController controller;
|
||||
@@ -89,7 +93,7 @@ extends Screen {
|
||||
this.mapY = 40;
|
||||
this.mapW = Math.max(120, this.panelX - this.mapX - 8);
|
||||
// 底部信息区高度(日志 + 状态文本),地图填满其上方空间
|
||||
int infoHeight = 78;
|
||||
int infoHeight = 88;
|
||||
this.mapH = Math.max(140, this.height - this.mapY - infoHeight - 8);
|
||||
|
||||
// 屏幕较矮时压缩垂直间距,保证右侧面板内容不被截断
|
||||
@@ -99,6 +103,9 @@ extends Screen {
|
||||
|
||||
// ===== 顶部控制按钮 =====
|
||||
int topX = this.panelX;
|
||||
// 左上角外部链接按钮:Git 仓库与官网(点击在系统浏览器打开)
|
||||
this.addDrawableChild(ButtonWidget.builder(Text.literal((String)"Git \u4ed3\u5e93"), button -> this.openUrl(GIT_REPO_URL)).dimensions(this.mapX, 8, 70, 16).build());
|
||||
this.addDrawableChild(ButtonWidget.builder(Text.literal((String)"\u5b98\u7f51"), button -> this.openUrl(HOMEPAGE_URL)).dimensions(this.mapX + 76, 8, 50, 16).build());
|
||||
ButtonWidget startButton = ButtonWidget.builder(Text.literal((String)"\u5f00\u59cb\u81ea\u52a8\u6269\u5730"), button -> this.start()).dimensions(topX, 34, 154, 30).build();
|
||||
ButtonWidget stopButton = ButtonWidget.builder(Text.literal((String)"\u505c\u6b62"), button -> this.controller.stop()).dimensions(topX + 160, 34, 74, 30).build();
|
||||
this.addDrawableChild(startButton);
|
||||
@@ -158,6 +165,15 @@ extends Screen {
|
||||
this.initializeMapView();
|
||||
}
|
||||
|
||||
/** 在系统默认浏览器中打开外部链接(失败时静默忽略) */
|
||||
private void openUrl(String url) {
|
||||
try {
|
||||
Util.getOperatingSystem().open(new java.net.URI(url));
|
||||
} catch (Exception ignored) {
|
||||
// 链接打开失败不影响界面正常使用
|
||||
}
|
||||
}
|
||||
|
||||
/** 创建整数输入框(初始值为 value,最多 12 位) */
|
||||
private TextFieldWidget numberField(int value, int x, int y, int width) {
|
||||
TextFieldWidget field = new TextFieldWidget(this.textRenderer, x, y, width, 20, Text.literal((String)""));
|
||||
@@ -422,26 +438,50 @@ extends Screen {
|
||||
|
||||
/** 绘制右侧信息面板:字段标签、运行日志与状态/进度信息 */
|
||||
private void drawInfo(DrawContext context) {
|
||||
int shown;
|
||||
// ===== 右侧配置面板字段标签 =====
|
||||
context.drawTextWithShadow(this.textRenderer, "\u90a6\u56fd", this.panelX + 4, this.stateFieldY + 4, -5592406);
|
||||
context.drawTextWithShadow(this.textRenderer, "\u76ee\u6807\u6570\u91cf", this.panelX + 4, this.targetFieldY + 4, -5592406);
|
||||
context.drawTextWithShadow(this.textRenderer, "\u6743\u9650\u8bbe\u7f6e", this.panelX + 4, this.advancedY, -5592406);
|
||||
int belowY = this.mapY + this.mapH + 12;
|
||||
|
||||
// ===== 底部信息面板:日志(左)+ 状态(右),均单行截断,避免换行导致的重叠 =====
|
||||
int infoTop = this.mapY + this.mapH + 10;
|
||||
int logWidth = Math.max(120, (int)(this.mapW * 0.52));
|
||||
int statusX = this.mapX + logWidth + 20;
|
||||
int statusWidth = this.mapW - logWidth - 20;
|
||||
int statusX = this.mapX + logWidth + 24;
|
||||
int statusWidth = this.mapW - logWidth - 24;
|
||||
|
||||
// 半透明面板背景,使信息区与地图明显分隔
|
||||
context.fill(this.mapX, infoTop - 2, this.mapX + this.mapW, infoTop + 74, 0x30000000);
|
||||
// 两栏标题与竖向分隔线
|
||||
context.drawTextWithShadow(this.textRenderer, "\u8fd0\u884c\u65e5\u5fd7", this.mapX + 2, infoTop, -5592406);
|
||||
context.drawTextWithShadow(this.textRenderer, "\u72b6\u6001\u4fe1\u606f", statusX, infoTop, -5592406);
|
||||
context.fill(statusX - 12, infoTop - 1, statusX - 11, infoTop + 58, -12761518);
|
||||
|
||||
// 运行日志:最多 4 条,最新日志在最下方
|
||||
List<String> logs = this.controller.logs();
|
||||
for (int i = shown = Math.min(4, logs.size()); i > 0; --i) {
|
||||
String trimmed = this.textRenderer.trimToWidth(logs.get(logs.size() - i), logWidth);
|
||||
context.drawTextWithShadow(this.textRenderer, trimmed, this.mapX, belowY + (shown - i) * 12, -6577233);
|
||||
int shown = Math.min(4, logs.size());
|
||||
for (int i = 0; i < shown; ++i) {
|
||||
String trimmed = this.textRenderer.trimToWidth(logs.get(logs.size() - shown + i), logWidth - 4);
|
||||
context.drawTextWithShadow(this.textRenderer, trimmed, this.mapX + 2, infoTop + 12 + i * 12, -6577233);
|
||||
}
|
||||
|
||||
// 状态信息:单行截断 + 固定 12px 行距,彻底消除换行重叠
|
||||
int target = this.config.targetCount;
|
||||
String targetText = target > 0 ? Integer.toString(target) : "\u6301\u7eed";
|
||||
context.drawWrappedTextWithShadow(this.textRenderer, Text.literal(("\u72b6\u6001\uff1a" + this.controller.status())), statusX, belowY, statusWidth, -1);
|
||||
context.drawWrappedTextWithShadow(this.textRenderer, Text.literal(("\u8fdb\u5ea6\uff1a" + this.controller.completedClaims() + " / " + targetText + "\uff0c\u7b49\u5f85\uff1a" + this.controller.lastProgress() + "%")), statusX, belowY + 14, statusWidth, -1);
|
||||
context.drawWrappedTextWithShadow(this.textRenderer, Text.literal(("\u961f\u5217\uff1a" + this.controller.queuedTargets() + "\uff0c\u6570\u636e\u9519\u8bef\uff1a" + (this.mod.dataService().lastError().isEmpty() ? "\u65e0" : this.mod.dataService().lastError()))), statusX, belowY + 30, statusWidth, -1);
|
||||
context.drawWrappedTextWithShadow(this.textRenderer, Text.literal(this.refreshStatusText()), statusX, belowY + 46, statusWidth, -5592406);
|
||||
context.drawWrappedTextWithShadow(this.textRenderer, Text.literal((String)"\u5f00\u59cb\u524d\u8bf7\u786e\u8ba4\u5df2\u624b\u52a8\u6267\u884c /u claimmode"), statusX, belowY + 62, statusWidth, -13210);
|
||||
String error = this.mod.dataService().lastError();
|
||||
String[] statusLines = new String[]{
|
||||
"\u72b6\u6001\uff1a" + this.controller.status(),
|
||||
"\u8fdb\u5ea6\uff1a" + this.controller.completedClaims() + " / " + targetText + "\uff0c\u7b49\u5f85\uff1a" + this.controller.lastProgress() + "%",
|
||||
"\u961f\u5217\uff1a" + this.controller.queuedTargets() + "\uff0c\u6570\u636e\u9519\u8bef\uff1a" + (error.isEmpty() ? "\u65e0" : error),
|
||||
this.refreshStatusText()
|
||||
};
|
||||
for (int i = 0; i < statusLines.length; ++i) {
|
||||
String trimmed = this.textRenderer.trimToWidth(statusLines[i], statusWidth);
|
||||
context.drawTextWithShadow(this.textRenderer, trimmed, statusX, infoTop + 12 + i * 12, -1);
|
||||
}
|
||||
|
||||
// 底部整行提示
|
||||
String hint = this.textRenderer.trimToWidth("\u5f00\u59cb\u524d\u8bf7\u786e\u8ba4\u5df2\u624b\u52a8\u6267\u884c /u claimmode", this.mapW);
|
||||
context.drawTextWithShadow(this.textRenderer, hint, this.mapX + 2, infoTop + 62, -13210);
|
||||
}
|
||||
|
||||
/** 生成地图刷新状态文本(显示上次成功刷新距今的时间) */
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"schemaVersion":1,"id":"autostore","version":"1.1.1","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.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"}]}
|
||||
在新工单中引用
屏蔽一个用户