diff options
author | syeyoung <cyong06@naver.com> | 2021-03-31 10:40:12 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-03-31 10:40:12 +0900 |
commit | 15317450019d9fe10ab0f599f0c0fdf900fdaf0c (patch) | |
tree | 9fc25f6bfe67e1bd8ccf0536be5027eba310ac48 /src/main/java/kr/syeyoung/dungeonsguide/features | |
parent | 833e0c8834b8df95b33e44f579a66d58b53679c3 (diff) | |
download | Skyblock-Dungeons-Guide-15317450019d9fe10ab0f599f0c0fdf900fdaf0c.tar.gz Skyblock-Dungeons-Guide-15317450019d9fe10ab0f599f0c0fdf900fdaf0c.tar.bz2 Skyblock-Dungeons-Guide-15317450019d9fe10ab0f599f0c0fdf900fdaf0c.zip |
bug fixes
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features')
5 files changed, 13 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBoxRealLivid.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBoxRealLivid.java index 29060c1e..1464d397 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBoxRealLivid.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBoxRealLivid.java @@ -32,6 +32,7 @@ public class FeatureBoxRealLivid extends SimpleFeature implements WorldRenderLis public void drawWorld(float partialTicks) { if (!isEnabled()) return; if (!skyblockStatus.isOnDungeon()) return; + if (skyblockStatus.getContext() == null) return; if (skyblockStatus.getContext().getBossfightProcessor() == null) return; if (!(skyblockStatus.getContext().getBossfightProcessor() instanceof BossfightProcessorLivid)) return; EntityOtherPlayerMP playerMP = ((BossfightProcessorLivid) skyblockStatus.getContext().getBossfightProcessor()).getRealLivid(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureHideAnimals.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureHideAnimals.java index 743b9f35..dfce6493 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureHideAnimals.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureHideAnimals.java @@ -34,6 +34,7 @@ public class FeatureHideAnimals extends SimpleFeature implements EntityLivingRen public void onEntityRenderPre(RenderLivingEvent.Pre renderPlayerEvent) { if (!isEnabled()) return; if (!skyblockStatus.isOnDungeon()) return; + if (skyblockStatus.getContext() == null) return; if (skyblockStatus.getContext().getBossfightProcessor() == null) return; if (!(skyblockStatus.getContext().getBossfightProcessor() instanceof BossfightProcessorThorn)) return; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java index a14b9c99..e7e899d3 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java @@ -104,7 +104,7 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, @Override public void drawHUD(float partialTicks) { if (!skyblockStatus.isOnDungeon()) return; - if (skyblockStatus.getContext() == null | !skyblockStatus.getContext().getMapProcessor().isInitialized()) return; + if (skyblockStatus.getContext() == null || !skyblockStatus.getContext().getMapProcessor().isInitialized()) return; if (!on) return;; DungeonContext context = skyblockStatus.getContext(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSecrets.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSecrets.java index 42df10ad..b6c4bde7 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSecrets.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSecrets.java @@ -74,6 +74,7 @@ public class FeatureDungeonSecrets extends TextHUDFeature { public String getTotalSecrets() { DungeonContext context = skyblockStatus.getContext(); + if (context == null) return "?"; int totalSecrets = 0; boolean allknown = true; for (DungeonRoom dungeonRoom : context.getDungeonRoomList()) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java index bd80f0f1..54353e34 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java @@ -34,6 +34,7 @@ import java.awt.*; import java.util.List; import java.util.ArrayList; import java.util.Map; +import java.util.UUID; public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderListener, GuiClickListener, WorldRenderListener { @@ -51,6 +52,7 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis } SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); + private UUID lastRoomUID = null; @Override public void drawHUD(float partialTicks) { if (Minecraft.getMinecraft().currentScreen != null && !(Minecraft.getMinecraft().currentScreen instanceof GuiGuiLocationConfig @@ -69,6 +71,13 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis Point roomPt = context.getMapProcessor().worldPointToRoomPoint(thePlayer.getPosition()); DungeonRoom dungeonRoom = context.getRoomMapper().get(roomPt); if (dungeonRoom == null) return; + if (!dungeonRoom.getDungeonRoomInfo().getUuid().equals(lastRoomUID)) { + selected = -1; + selectedState = -1; + dy = 0; + } + lastRoomUID = dungeonRoom.getDungeonRoomInfo().getUuid(); + if (!(dungeonRoom.getRoomProcessor() instanceof GeneralRoomProcessor)) return; GeneralRoomProcessor grp = (GeneralRoomProcessor) dungeonRoom.getRoomProcessor(); |