From 17c03f629a54570cd2a7137ea64b05396606c4de Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sun, 17 Dec 2023 12:48:05 +0100 Subject: [PATCH] Fix SimulatorBaseGui open --- .../features/simulator/gui/base/SimulatorBaseGui.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorBaseGui.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorBaseGui.java index 1be012f3..41f95a88 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorBaseGui.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorBaseGui.java @@ -62,7 +62,10 @@ public abstract class SimulatorBaseGui { player.getOpenInventory().setTitle(title()); } populate(); - inventory.open(); + if (player.getOpenInventory().getTopInventory() == inv) { + inventory.open(); + SimulatorWatcher.watch(player, simulator, this::open); + } return; }