aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/dungeon/secrets/DungeonManager.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/dungeon/secrets/DungeonManager.java b/src/main/java/de/hysky/skyblocker/skyblock/dungeon/secrets/DungeonManager.java
index 52a1433e..63e71abe 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/dungeon/secrets/DungeonManager.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/dungeon/secrets/DungeonManager.java
@@ -565,11 +565,19 @@ public class DungeonManager {
if (client.player == null || client.world == null) {
return;
}
- if (physicalEntrancePos == null) {
- Vec3d playerPos = client.player.getPos();
- physicalEntrancePos = DungeonMapUtils.getPhysicalRoomPos(playerPos);
- currentRoom = newRoom(Room.Type.ENTRANCE, physicalEntrancePos);
- }
+
+ if (physicalEntrancePos == null) {
+ //The check for the area should delay this until after the player's position has been set by the server (since the scoreboard should be sent after the player position)
+ //this is necessary otherwise the default position of (0, 0) or whatever will mess up the entrance calculation which will break all sorts of things
+ if (!Utils.getIslandArea().contains("The Catacombs")) {
+ return;
+ }
+
+ Vec3d playerPos = client.player.getPos();
+ physicalEntrancePos = DungeonMapUtils.getPhysicalRoomPos(playerPos);
+ currentRoom = newRoom(Room.Type.ENTRANCE, physicalEntrancePos);
+ }
+
MapState map = FilledMapItem.getMapState(DungeonMap.getMapIdComponent(client.player.getInventory().main.get(8)), client.world);
if (map == null) {
return;