From 6e39f3e92a283726186b7c77d0d9cf82eb7f5ec1 Mon Sep 17 00:00:00 2001 From: D4rkr34lm Date: Tue, 10 Oct 2023 17:27:55 +0200 Subject: [PATCH] Made some fixes --- .../simulator2/gui/SimulatorTntPhaseGui.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator2/gui/SimulatorTntPhaseGui.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator2/gui/SimulatorTntPhaseGui.java index c8a45d1f..e9b3defd 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator2/gui/SimulatorTntPhaseGui.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator2/gui/SimulatorTntPhaseGui.java @@ -86,7 +86,7 @@ public class SimulatorTntPhaseGui extends SimulatorBaseGui{ countItem.getItemStack().setAmount(Math.max(1, Math.min(count, 64))); inventory.setItem(19, countItem); - inventory.setItem(28, SWItem.getDye(count > 0 ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> { + inventory.setItem(28, SWItem.getDye(count > 1 ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> { tnt.setCount(Math.max(1, count - (clickType.isShiftClick() ? -5 : -1))); SimulatorWatcher.update(simulator); }); @@ -125,34 +125,34 @@ public class SimulatorTntPhaseGui extends SimulatorBaseGui{ //Order int order = tnt.getOrder(); - inventory.setItem(13, SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> { + inventory.setItem(13, SWItem.getDye(order < SimulatorSetting.ORDER_LIMIT ? 10 : 8), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> { tnt.setOrder(Math.min(SimulatorSetting.ORDER_LIMIT, order + (clickType.isShiftClick() ? 5 : 1))); SimulatorWatcher.update(simulator); }); SWItem orderItem = new SWItem(Material.COMPASS, "§eLifetime§8:§7 " + order, clickType -> {}); - orderItem.getItemStack().setAmount(Math.max(1, Math.min(order, 64))); inventory.setItem(22, orderItem); - inventory.setItem(31, SWItem.getDye(order > 0 ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> { + + inventory.setItem(31, SWItem.getDye(order > 1 ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> { tnt.setOrder(Math.max(1, order - (clickType.isShiftClick() ? -5 : -1))); SimulatorWatcher.update(simulator); }); //Jump - SWItem jumpX = new SWItem(tnt.isXJump() ? Material.GREEN_WOOL : Material.RED_WOOL, "§7TNT §eJump X§8: " + (tnt.isZJump() ? "§aon" : "§coff"), clickType -> { + SWItem jumpX = new SWItem(tnt.isXJump() ? Material.LIME_WOOL : Material.RED_WOOL, "§7TNT §eJump X§8: " + (tnt.isZJump() ? "§aon" : "§coff"), clickType -> { tnt.setXJump(!tnt.isXJump()); SimulatorWatcher.update(simulator); }); inventory.setItem(33, jumpX); - SWItem jumpY = new SWItem(tnt.isYJump() ? Material.GREEN_WOOL : Material.RED_WOOL, "§7TNT §eJump Y§8: " + (tnt.isYJump() ? "§aon" : "§coff"), clickType -> { + SWItem jumpY = new SWItem(tnt.isYJump() ? Material.LIME_WOOL : Material.RED_WOOL, "§7TNT §eJump Y§8: " + (tnt.isYJump() ? "§aon" : "§coff"), clickType -> { tnt.setYJump(!tnt.isYJump()); SimulatorWatcher.update(simulator); }); inventory.setItem(16, jumpY); - SWItem jumpZ = new SWItem(tnt.isZJump() ? Material.GREEN_WOOL : Material.RED_WOOL, "§7TNT §eJump Z§8: " + (tnt.isZJump() ? "§aon" : "§coff"), clickType -> { + SWItem jumpZ = new SWItem(tnt.isZJump() ? Material.LIME_WOOL : Material.RED_WOOL, "§7TNT §eJump Z§8: " + (tnt.isZJump() ? "§aon" : "§coff"), clickType -> { tnt.setZJump(!tnt.isZJump()); SimulatorWatcher.update(simulator); });