fix: try fix #63

This commit is contained in:
Helvetica Volubi
2025-10-22 02:41:51 +08:00
parent 5845b976c1
commit 83e7718346
@@ -309,7 +309,7 @@ public class BotList {
} else {
finished = false;
check.getAndIncrement();
removeBot(bot, check, received, new AtomicInteger());
this.removeBot(bot, check, received, new AtomicInteger());
}
}
return finished;
@@ -321,13 +321,17 @@ public class BotList {
BotList.LOGGER.info("Try to remove bot {} located in [{}]{},{},{} too many times!", bot.getName().getString(), bot.level().serverLevelData.getLevelName(), bot.getX(), bot.getY(), bot.getZ());
}
counter.getAndIncrement();
this.removeBot(bot, BotRemoveEvent.RemoveReason.INTERNAL, null, FakeplayerConfig.canResident);
received.getAndIncrement();
try {
this.removeBot(bot, BotRemoveEvent.RemoveReason.INTERNAL, null, FakeplayerConfig.canResident);
received.getAndIncrement();
} catch (Exception e) {
this.removeBot(bot, check, received, counter);
}
if (received.get() >= check.get()) {
this.forceShutdown = true;
MinecraftServer.getServer().stopServer();
}
}, (Entity unused) -> removeBot(bot, check, received, counter), 1L);
}, null, 1L);
}
public void loadBotInfo() {