From 148761fa6387633ff5e43dca08b2d12fb461a29e Mon Sep 17 00:00:00 2001 From: D4rkr34lm Date: Mon, 9 Oct 2023 16:54:41 +0200 Subject: [PATCH] Add Subpixel alignment to SimTNTSettingGui --- .../simulator2/gui/SimulatorTNTSettingsGui.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator2/gui/SimulatorTNTSettingsGui.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator2/gui/SimulatorTNTSettingsGui.java index dc90b12b..3f338eed 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator2/gui/SimulatorTNTSettingsGui.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator2/gui/SimulatorTNTSettingsGui.java @@ -27,6 +27,7 @@ import de.steamwar.bausystem.features.simulator2.gui.utils.SimulatorMaterialGui; import de.steamwar.inventory.SWItem; import org.bukkit.Material; import org.bukkit.entity.Player; +import org.bukkit.util.Vector; import java.util.ArrayList; import java.util.Arrays; @@ -86,29 +87,29 @@ public class SimulatorTNTSettingsGui extends SimulatorBaseGui { // Subpixel Alignment inventory.setItem(24, new SWItem(Material.SUNFLOWER, "§7Align§8: §eCenter", clickType -> { - // tnt.align(new Vector()); TODO Finalize + tnt.align(new Vector(0.5, 0, 0.5)); SimulatorWatcher.update(simulator); })); //z inventory.setItem(23, new SWItem(Material.OAK_BUTTON, "§7Align§8: §eNegativ Z", clickType -> { - + tnt.align(new Vector(0, 0, 0.49)); SimulatorWatcher.update(simulator); })); inventory.setItem(25, new SWItem(Material.OAK_BUTTON, "§7Align§8: §ePositiv Z", clickType -> { - + tnt.align(new Vector(0, 0, 0.51)); SimulatorWatcher.update(simulator); })); //X - inventory.setItem(15, new SWItem(Material.OAK_BUTTON, "§7Align§8: §eNegativ Z", clickType -> { - + inventory.setItem(15, new SWItem(Material.OAK_BUTTON, "§7Align§8: §eNegativ X", clickType -> { + tnt.align(new Vector(0.49, 0, 0)); SimulatorWatcher.update(simulator); })); - inventory.setItem(33, new SWItem(Material.OAK_BUTTON, "§7Align§8: §ePositiv Z", clickType -> { - + inventory.setItem(33, new SWItem(Material.OAK_BUTTON, "§7Align§8: §ePositiv X", clickType -> { + tnt.align(new Vector(0.51, 0, 0)); SimulatorWatcher.update(simulator); }));