From 0f69d4acb15b6dc95f8addbbdbd7c89945ccf9fa Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 24 Feb 2023 17:50:53 +0100 Subject: [PATCH] Update some code Signed-off-by: yoyosource --- .../features/simulator/SimulatorCursor.java | 2 +- .../features/simulator/TNTSimulator.java | 24 ------------------- 2 files changed, 1 insertion(+), 25 deletions(-) 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 cc3873f2..ab3eba86 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCursor.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCursor.java @@ -56,11 +56,11 @@ public class SimulatorCursor { if (result.getHitEntity() != null) { List elements = tntSimulator.getEntity(result.getHitEntity()); - tntSimulator.hide(player, elements); cursor = new REntityServer(); RFallingBlockEntity entity = new RFallingBlockEntity(cursor, (elements.isEmpty() ? getPos(player, result) : elements.get(0).getPosition()).toLocation(WORLD), Material.WHITE_STAINED_GLASS); entity.setNoGravity(true); + entity.setGlowing(true); cursor.addPlayer(player); rEntityServerMap.put(player, cursor); BauSystem.MESSAGE.sendPrefixless("SIMULATOR_POSITION_EDIT", player, ChatMessageType.ACTION_BAR); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulator.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulator.java index 5a62e119..39057f99 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulator.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulator.java @@ -23,7 +23,6 @@ import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.configplayer.Config; import de.steamwar.bausystem.features.simulator.gui.TNTElementGUI; import de.steamwar.bausystem.features.simulator.gui.TNTSimulatorGui; -import de.steamwar.bausystem.features.simulator.show.SimulatorEntityShowMode; import de.steamwar.bausystem.features.simulator.tnt.SimulatorElement; import de.steamwar.bausystem.features.simulator.tnt.TNTElement; import de.steamwar.bausystem.features.simulator.tnt.TNTGroup; @@ -98,28 +97,6 @@ public class TNTSimulator { players.remove(player); } - public void hide(Player player, List simulatorElements) { - SimulatorEntityShowMode showMode = playerShowMode.get(player); - if (showMode == null) { - return; - } - simulatorElements.forEach(simulatorElement -> { - simulatorElement.hide(showMode); - }); - } - - public void hide(SimulatorElement simulatorElement) { - playerShowMode.forEach((player, simulatorEntityShowMode) -> { - simulatorElement.hide(simulatorEntityShowMode); - }); - } - - public void show(SimulatorElement simulatorElement) { - playerShowMode.forEach((player, simulatorEntityShowMode) -> { - simulatorElement.show(simulatorEntityShowMode); - }); - } - public List getEntities() { return tntElementList.stream().flatMap(element -> element.getEntities().stream()).collect(Collectors.toList()); } @@ -133,7 +110,6 @@ public class TNTSimulator { } public void remove(SimulatorElement element) { - hide(element); tntElementList.remove(element); Set toRemove = new HashSet<>(); for (SimulatorElement spawn : tntElementList) {