aboutsummaryrefslogtreecommitdiff
path: root/mod/src/main
diff options
context:
space:
mode:
authorsyeyoung <cyoung06@naver.com>2023-01-23 00:19:27 +0900
committersyeyoung <cyoung06@naver.com>2023-01-23 00:32:04 +0900
commita3c346beabf975f7cb3e7f58a392cc5e626f79ca (patch)
tree7c7dc87c36037c3bcf8aa3e1c5fc4a9cfa724809 /mod/src/main
parent6f00f738c29dd296fe962c990b0221092d29fb53 (diff)
downloadSkyblock-Dungeons-Guide-a3c346beabf975f7cb3e7f58a392cc5e626f79ca.tar.gz
Skyblock-Dungeons-Guide-a3c346beabf975f7cb3e7f58a392cc5e626f79ca.tar.bz2
Skyblock-Dungeons-Guide-a3c346beabf975f7cb3e7f58a392cc5e626f79ca.zip
- Fix #263
Signed-off-by: syeyoung <cyoung06@naver.com>
Diffstat (limited to 'mod/src/main')
-rwxr-xr-xmod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomfinder/DungeonRoom.java3
-rwxr-xr-xmod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/RoomProcessorTeleportMazeSolver.java5
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureDungeonMap.java5
3 files changed, 9 insertions, 4 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomfinder/DungeonRoom.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomfinder/DungeonRoom.java
index 809f7272..236dcb40 100755
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomfinder/DungeonRoom.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomfinder/DungeonRoom.java
@@ -98,7 +98,8 @@ public class DungeonRoom {
}
public void setCurrentState(RoomState currentState) {
- context.getRecorder().createEvent(new DungeonStateChangeEvent(unitPoints.iterator().next(), dungeonRoomInfo.getName(), this.currentState, currentState));
+ context.getRecorder().createEvent(new DungeonStateChangeEvent(unitPoints.iterator().next(),
+ dungeonRoomInfo == null ? null : dungeonRoomInfo.getName(), this.currentState, currentState));
this.currentState = currentState;
}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/RoomProcessorTeleportMazeSolver.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/RoomProcessorTeleportMazeSolver.java
index 927ed1de..b569380f 100755
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/RoomProcessorTeleportMazeSolver.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/RoomProcessorTeleportMazeSolver.java
@@ -87,7 +87,10 @@ public class RoomProcessorTeleportMazeSolver extends GeneralRoomProcessor {
if (b == Blocks.stone_slab || b == Blocks.stone_slab2) {
boolean teleport = false;
- if (lastPlayerLocation != null && lastPlayerLocation.distanceSq(pos2) < 3) {
+ if (lastPlayerLocation == null) {
+ return;
+ }
+ if (lastPlayerLocation.distanceSq(pos2) < 3) {
return;
}
for (BlockPos allInBox : BlockPos.getAllInBox(lastPlayerLocation, pos2)) {
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureDungeonMap.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureDungeonMap.java
index 51664280..5e662d2b 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureDungeonMap.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureDungeonMap.java
@@ -447,6 +447,7 @@ public class FeatureDungeonMap extends RawRenderingGuiFeature {
Minecraft.getMinecraft().getTextureManager().bindTexture(mapIcons);
for (Vec4b vec4b : mapData.mapDecorations.values()) {
if (vec4b.func_176110_a() == 1 || this.shouldShowOtherPlayers) {
+ GlStateManager.enableTexture2D();
GlStateManager.pushMatrix();
GlStateManager.translate(vec4b.func_176112_b() / 2.0F + 64.0F, vec4b.func_176113_c() / 2.0F + 64.0F, -0.02F);
GlStateManager.rotate((vec4b.func_176111_d() * 360) / 16.0F, 0.0F, 0.0F, 1.0F);
@@ -458,9 +459,9 @@ public class FeatureDungeonMap extends RawRenderingGuiFeature {
GlStateManager.translate(-0.125F, 0.125F, 0.0F);
byte b0 = vec4b.func_176110_a();
float f1 = (b0 % 4) / 4.0F;
- float f2 = (b0 / 4f) / 4.0F;
+ float f2 = (b0 / 4) / 4.0F;
float f3 = (b0 % 4 + 1) / 4.0F;
- float f4 = (b0 / 4f + 1) / 4.0F;
+ float f4 = (b0 / 4 + 1) / 4.0F;
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
worldrenderer.pos(-1.0D, 1.0D, k * -0.001F).tex(f1, f2).endVertex();
worldrenderer.pos(1.0D, 1.0D, k * -0.001F).tex(f3, f2).endVertex();