From 769e4a2f42daf94232386deedcaa79002c911c5c Mon Sep 17 00:00:00 2001 From: syeyoung <42869671+cyoung06@users.noreply.github.com> Date: Mon, 14 Dec 2020 18:53:20 +0900 Subject: o lol serialize them --- .../kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonMechanic.java | 3 ++- .../kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonMechanic.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonMechanic.java index 7bd4d71b..31f03eac 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonMechanic.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonMechanic.java @@ -4,9 +4,10 @@ import kr.syeyoung.dungeonsguide.dungeon.mechanics.action.Action; import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; import java.awt.*; +import java.io.Serializable; import java.util.Set; -public interface DungeonMechanic { +public interface DungeonMechanic extends Serializable { Set getAction(String state, DungeonRoom dungeonRoom); void highlight(Color color, String name, DungeonRoom dungeonRoom, float partialTicks); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java index e097817f..3abd5bb4 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java @@ -3,6 +3,8 @@ package kr.syeyoung.dungeonsguide.roomprocessor; import kr.syeyoung.dungeonsguide.e; import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonMechanic; import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; +import kr.syeyoung.dungeonsguide.roomedit.EditingContext; +import kr.syeyoung.dungeonsguide.roomedit.gui.GuiDungeonRoomEdit; import lombok.Getter; import lombok.Setter; import net.minecraft.util.IChatComponent; @@ -31,7 +33,7 @@ public class GeneralRoomProcessor implements RoomProcessor { @Override public void drawWorld(float partialTicks) { - if (e.DEBUG) { + if (e.DEBUG && (EditingContext.getEditingContext() == null || EditingContext.getEditingContext().getCurrent() instanceof GuiDungeonRoomEdit)) { for (Map.Entry value : dungeonRoom.getDungeonRoomInfo().getMechanics().entrySet()) { if (value.getValue() == null) continue;; value.getValue().highlight(new Color(0,255,255,50), value.getKey(), dungeonRoom, partialTicks); -- cgit