Minor refactoring/fixes
This commit is contained in:
parent
89f19f3218
commit
934fc3842b
2 changed files with 2 additions and 1 deletions
|
@ -229,6 +229,7 @@ public class BattleGui extends Screen {
|
|||
if (TurnBasedMinecraftMod.proxy.getLocalBattle() == null) {
|
||||
// drawHoveringText("Waiting...", width / 2 - 50, height / 2);
|
||||
drawString(guiGraphics, "Waiting...", width / 2 - 50, height / 2, 0xFFFFFFFF);
|
||||
super.render(guiGraphics, mouseX, mouseY, partialTicks);
|
||||
return;
|
||||
}
|
||||
if (TurnBasedMinecraftMod.proxy.getLocalBattle().getState() == Battle.State.DECISION
|
||||
|
|
|
@ -27,7 +27,7 @@ public class BattleUpdater
|
|||
@SubscribeEvent
|
||||
public void update(ServerTickEvent.Post tickEvent) {
|
||||
//if(tickEvent.phase != TickEvent.Phase.START && isRunning.get() && ++tick > tickLimit) {
|
||||
if(isRunning.get() && ++tick > tickLimit) {
|
||||
if(isRunning.get() && ++tick > tickLimit && tickEvent.hasTime()) {
|
||||
tick = 0;
|
||||
manager.battleMap.entrySet().removeIf(entry -> entry.getValue().update());
|
||||
manager.updateRecentlyLeftBattle();
|
||||
|
|
Loading…
Reference in a new issue