aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/features/impl
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/impl')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureBoxRealLivid.java1
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureHideAnimals.java1
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonSecrets.java1
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java9
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();