From 070a58651bb5421550d759e090000cce66d2d224 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 24 Feb 2023 20:25:27 +0100 Subject: [PATCH] Last Hotfixes Signed-off-by: yoyosource --- .../de/steamwar/bausystem/features/detonator/Detonator.java | 2 +- .../bausystem/features/simulator/SimulatorCursor.java | 2 +- .../bausystem/features/simulator/gui/TNTElementGUI.java | 6 +++++- .../bausystem/features/simulator/gui/TNTGroupEditGUI.java | 4 ++-- .../bausystem/features/simulator/gui/TNTSimulatorGui.java | 4 ++-- ignoredlog | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detonator.java b/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detonator.java index 54f0af6c..80d5b33b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detonator.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/Detonator.java @@ -57,7 +57,7 @@ public class Detonator { REntityServer entities = new REntityServer(); entities.setCallback((player, rEntity, entityAction) -> { Vector vector = new Vector(rEntity.getX(), rEntity.getY(), rEntity.getZ()); - DetonatorListener.addLocationToDetonator(vector.toLocation(player.getWorld()), player); + DetonatorListener.addLocationToDetonator(vector.toLocation(player.getWorld()).getBlock().getLocation(), player); DetonatorListener.HAS_UPDATED.add(player); }); entities.addPlayer(p); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCursor.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCursor.java index ab3eba86..caa3af54 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCursor.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCursor.java @@ -58,7 +58,7 @@ public class SimulatorCursor { List elements = tntSimulator.getEntity(result.getHitEntity()); cursor = new REntityServer(); - RFallingBlockEntity entity = new RFallingBlockEntity(cursor, (elements.isEmpty() ? getPos(player, result) : elements.get(0).getPosition()).toLocation(WORLD), Material.WHITE_STAINED_GLASS); + RFallingBlockEntity entity = new RFallingBlockEntity(cursor, (elements.isEmpty() ? getPos(player, result) : elements.get(0).getPosition()).toLocation(WORLD), Material.TNT); entity.setNoGravity(true); entity.setGlowing(true); cursor.addPlayer(player); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/TNTElementGUI.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/TNTElementGUI.java index fed35fa6..bfd0312b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/TNTElementGUI.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/TNTElementGUI.java @@ -126,7 +126,11 @@ public class TNTElementGUI { Runnable editObserver = () -> { ChangePosition.show(inv, player, tntElement, vectorUnaryOperator -> { - tntElement.setPosition(vectorUnaryOperator.apply(tntElement.getPosition()).subtract(tntElement.getParent().getPosition())); + if (tntElement.getParent() == null) { + tntElement.setPosition(vectorUnaryOperator.apply(tntElement.getPosition())); + } else { + tntElement.setPosition(vectorUnaryOperator.apply(tntElement.getPosition()).subtract(tntElement.getParent().getPosition())); + } }, () -> editLocation(player, tntElement, back)); // Alignment diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/TNTGroupEditGUI.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/TNTGroupEditGUI.java index f34a10fe..9c4aa70a 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/TNTGroupEditGUI.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/TNTGroupEditGUI.java @@ -120,10 +120,10 @@ public class TNTGroupEditGUI { for (SimulatorElement element : simulatorElements) { if (element instanceof TNTGroup) { TNTGroup group = (TNTGroup) element; - group.getPosition().add(vector); + group.setPosition(group.getPosition().add(vector)); } else if (element instanceof TNTElement) { TNTElement tntElement = (TNTElement) element; - tntElement.getOwnPosition().add(vector); + tntElement.setPosition(tntElement.getOwnPosition().add(vector)); } } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/TNTSimulatorGui.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/TNTSimulatorGui.java index 0030d2a4..89803582 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/TNTSimulatorGui.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/TNTSimulatorGui.java @@ -206,10 +206,10 @@ public class TNTSimulatorGui { for (SimulatorElement element : tntSimulator.getTntElementList()) { if (element instanceof TNTGroup) { TNTGroup group = (TNTGroup) element; - group.getPosition().add(vector); + group.setPosition(group.getPosition().add(vector)); } else if (element instanceof TNTElement) { TNTElement tntElement = (TNTElement) element; - tntElement.getOwnPosition().add(vector); + tntElement.setPosition(tntElement.getOwnPosition().add(vector)); } } } diff --git a/ignoredlog b/ignoredlog index b28379ba..6e12febe 100644 --- a/ignoredlog +++ b/ignoredlog @@ -1,2 +1,2 @@ -SteamWar? Unbekannter Befehl. +Unbekannter Befehl. moved too quickly! \ No newline at end of file