From 900c57dd3ebfcd3deae9302029785b6e0ba78947 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Tue, 12 Jan 2021 21:28:01 +0900 Subject: no esps! - Dungeons gang request --- options.txt | 2 +- .../features/impl/FeatureDungeonMap.java | 80 +++++++++++----------- .../roomprocessor/RoomProcessorRiddle.java | 2 +- .../RoomProcessorTeleportMazeSolver.java | 2 +- .../RoomProcessorTicTacToeSolver.java | 2 +- .../roomprocessor/RoomProcessorTrivia.java | 2 +- .../waterpuzzle/RoomProcessorWaterPuzzle.java | 8 +-- 7 files changed, 50 insertions(+), 48 deletions(-) diff --git a/options.txt b/options.txt index 1481e4d9..2616a1dc 100755 --- a/options.txt +++ b/options.txt @@ -91,7 +91,7 @@ key_key.hotbar.7:8 key_key.hotbar.8:9 key_key.hotbar.9:10 key_start editing session:19 -soundCategory_master:0.0 +soundCategory_master:1.0 soundCategory_music:0.0 soundCategory_record:1.0 soundCategory_weather:1.0 diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMap.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMap.java index d2fa632b..713ce74f 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMap.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMap.java @@ -152,35 +152,35 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, render(mapData, false); FontRenderer fr = getFontRenderer(); - for (DungeonRoom dungeonRoom : context.getDungeonRoomList()) { - GL11.glPushMatrix(); - GlStateManager.pushAttrib(); - Point mapPt = mapProcessor.roomPointToMapPoint(dungeonRoom.getUnitPoints().get(0)); - GL11.glTranslated(mapPt.x + mapProcessor.getUnitRoomDimension().width / 2, mapPt.y + mapProcessor.getUnitRoomDimension().height / 2, 0); - - if (this.getParameter("playerCenter").getValue() && this.getParameter("rotate").getValue()) { - GL11.glRotated(yaw - 180, 0, 0, 1); - } - GL11.glScaled(1 / scale, 1 / scale, 0); - GL11.glScaled(1 / postScale, 1 / postScale, 0); - String str= ""; - if (this.getParameter("showtotalsecrets").getValue()) { + if (this.getParameter("showtotalsecrets").getValue()) { + for (DungeonRoom dungeonRoom : context.getDungeonRoomList()) { + GL11.glPushMatrix(); + GlStateManager.pushAttrib(); + Point mapPt = mapProcessor.roomPointToMapPoint(dungeonRoom.getUnitPoints().get(0)); + GL11.glTranslated(mapPt.x + mapProcessor.getUnitRoomDimension().width / 2, mapPt.y + mapProcessor.getUnitRoomDimension().height / 2, 0); + + if (this.getParameter("playerCenter").getValue() && this.getParameter("rotate").getValue()) { + GL11.glRotated(yaw - 180, 0, 0, 1); + } + GL11.glScaled(1 / scale, 1 / scale, 0); + GL11.glScaled(1 / postScale, 1 / postScale, 0); + String str = ""; str += dungeonRoom.getTotalSecrets() == -1 ? "?" : String.valueOf(dungeonRoom.getTotalSecrets()); str += " "; - } - if (dungeonRoom.getCurrentState() == DungeonRoom.RoomState.FINISHED) { - str += "✔"; - } else if (dungeonRoom.getCurrentState() == DungeonRoom.RoomState.COMPLETE_WITHOUT_SECRETS) { - str += "☑"; - } else if (dungeonRoom.getCurrentState() == DungeonRoom.RoomState.DISCOVERED) { - str += "☐"; - } else if (dungeonRoom.getCurrentState() == DungeonRoom.RoomState.FAILED) { - str += "❌"; - } + if (dungeonRoom.getCurrentState() == DungeonRoom.RoomState.FINISHED) { + str += "✔"; + } else if (dungeonRoom.getCurrentState() == DungeonRoom.RoomState.COMPLETE_WITHOUT_SECRETS) { + str += "☑"; + } else if (dungeonRoom.getCurrentState() == DungeonRoom.RoomState.DISCOVERED) { + str += "☐"; + } else if (dungeonRoom.getCurrentState() == DungeonRoom.RoomState.FAILED) { + str += "❌"; + } - fr.drawString(str, -(fr.getStringWidth(str) / 2) , - (fr.FONT_HEIGHT / 2), dungeonRoom.getColor() == 74 ? 0xff000000 : 0xFFFFFFFF); - GlStateManager.popAttrib(); - GL11.glPopMatrix(); + fr.drawString(str, -(fr.getStringWidth(str) / 2), -(fr.FONT_HEIGHT / 2), dungeonRoom.getColor() == 74 ? 0xff000000 : 0xFFFFFFFF); + GlStateManager.popAttrib(); + GL11.glPopMatrix(); + } } GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(1, 771, 0, 1); @@ -253,19 +253,21 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, } } - for (DungeonRoom dungeonRoom : dungeonRooms) { - for (Point pt : dungeonRoom.getUnitPoints()) { - for (int y1 = 0; y1 < mapProcessor.getUnitRoomDimension().height; y1++) { - for (int x1 = 0; x1 < mapProcessor.getUnitRoomDimension().width; x1++) { - int x = MathHelper.clamp_int(pt.x * (mapProcessor.getUnitRoomDimension().width + mapProcessor.getDoorDimension().height) + x1 + mapProcessor.getTopLeftMapPoint().x, 0, 128); - int y = MathHelper.clamp_int(pt.y * (mapProcessor.getUnitRoomDimension().height + mapProcessor.getDoorDimension().height)+ y1 + mapProcessor.getTopLeftMapPoint().y, 0, 128); - int i = y * 128 + x; - int j = dungeonRoom.getColor(); - - if (j / 4 == 0) { - this.mapTextureData[i] = 0x00000000; - } else { - this.mapTextureData[i] = MapColor.mapColorArray[j / 4].func_151643_b(j & 3); + if (this.getParameter("showtotalsecrets").getValue()) { + for (DungeonRoom dungeonRoom : dungeonRooms) { + for (Point pt : dungeonRoom.getUnitPoints()) { + for (int y1 = 0; y1 < mapProcessor.getUnitRoomDimension().height; y1++) { + for (int x1 = 0; x1 < mapProcessor.getUnitRoomDimension().width; x1++) { + int x = MathHelper.clamp_int(pt.x * (mapProcessor.getUnitRoomDimension().width + mapProcessor.getDoorDimension().height) + x1 + mapProcessor.getTopLeftMapPoint().x, 0, 128); + int y = MathHelper.clamp_int(pt.y * (mapProcessor.getUnitRoomDimension().height + mapProcessor.getDoorDimension().height) + y1 + mapProcessor.getTopLeftMapPoint().y, 0, 128); + int i = y * 128 + x; + int j = dungeonRoom.getColor(); + + if (j / 4 == 0) { + this.mapTextureData[i] = 0x00000000; + } else { + this.mapTextureData[i] = MapColor.mapColorArray[j / 4].func_151643_b(j & 3); + } } } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorRiddle.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorRiddle.java index dc2d65e2..bab5ba42 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorRiddle.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorRiddle.java @@ -90,7 +90,7 @@ public class RoomProcessorRiddle extends GeneralRoomProcessor { super.drawWorld(partialTicks); if (!FeatureRegistry.SOLVER_RIDDLE.isEnabled()) return; if (chest != null) { - RenderUtils.highlightBlock(chest, new Color(0,255,0, 50),partialTicks); + RenderUtils.highlightBlock(chest, new Color(0,255,0, 50),partialTicks, true); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTeleportMazeSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTeleportMazeSolver.java index f523ffa9..257a0bee 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTeleportMazeSolver.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTeleportMazeSolver.java @@ -66,7 +66,7 @@ public class RoomProcessorTeleportMazeSolver extends GeneralRoomProcessor { super.drawWorld(partialTicks); if (!FeatureRegistry.SOLVER_TELEPORT.isEnabled()) return; for (BlockPos bpos:visitedPortals) { - RenderUtils.highlightBlock(bpos, new Color(255,0,0,100), partialTicks); + RenderUtils.highlightBlock(bpos, new Color(255,0,0,100), partialTicks, true); } } public static class Generator implements RoomProcessorGenerator { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTicTacToeSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTicTacToeSolver.java index 03c2f4e2..19911a34 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTicTacToeSolver.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTicTacToeSolver.java @@ -170,7 +170,7 @@ public class RoomProcessorTicTacToeSolver extends GeneralRoomProcessor { if (!FeatureRegistry.SOLVER_TICTACTOE.isEnabled()) return; if (chosePos != -1) { BlockPos block = board.getOffsetPointList().get(chosePos).getBlockPos(getDungeonRoom()); - RenderUtils.highlightBlock(block, new Color(0,255,255,50), partialTicks); + RenderUtils.highlightBlock(block, new Color(0,255,255,50), partialTicks, true); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java index cf2538f2..94ee9764 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java @@ -155,7 +155,7 @@ public class RoomProcessorTrivia extends GeneralRoomProcessor { OffsetPoint op = (OffsetPoint) getDungeonRoom().getDungeonRoomInfo().getProperties().get(correctAnswer); if (op != null) { - RenderUtils.highlightBlock(op.getBlockPos(getDungeonRoom()), new Color(0,255,0,50), partialTicks); + RenderUtils.highlightBlock(op.getBlockPos(getDungeonRoom()), new Color(0,255,0,50), partialTicks, true); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/RoomProcessorWaterPuzzle.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/RoomProcessorWaterPuzzle.java index ace719c9..ab19c562 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/RoomProcessorWaterPuzzle.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/waterpuzzle/RoomProcessorWaterPuzzle.java @@ -74,18 +74,18 @@ public class RoomProcessorWaterPuzzle extends GeneralRoomProcessor { if (condition == null) continue; SwitchData switchData = waterBoard.getValidSwitches().get(condition.getBlockId()); if (switchData.getCurrentState(getDungeonRoom().getContext().getWorld()) != condition.isRequiredState()) { - RenderUtils.highlightBlock(switchData.getSwitchLoc(), new Color(0,255,0,50), partialTicks); + RenderUtils.highlightBlock(switchData.getSwitchLoc(), new Color(0,255,0,50), partialTicks, true); RenderUtils.drawTextAtWorld(condition.isRequiredState() ? "on":"off",switchData.getSwitchLoc().getX(), switchData.getSwitchLoc().getY(), switchData.getSwitchLoc().getZ(), 0xFF000000,0.1f, false, false, partialTicks); } } for (WaterNode node : route.getNodes()) { - RenderUtils.highlightBlock(node.getBlockPos(), new Color(0,255,255,50), partialTicks); + RenderUtils.highlightBlock(node.getBlockPos(), new Color(0,255,255,50), partialTicks, true); } } BlockPos target = waterBoard.getTarget(); if (target != null) { - RenderUtils.highlightBlock(target, new Color(0,255,255,255), partialTicks); - RenderUtils.highlightBlock(waterBoard.getToggleableMap().get("mainStream").getBlockPos(), new Color(0,255,0,255), partialTicks); + RenderUtils.highlightBlock(target, new Color(0,255,255,100), partialTicks, true); + RenderUtils.highlightBlock(waterBoard.getToggleableMap().get("mainStream").getBlockPos(), new Color(0,255,0,255), partialTicks, true); } } -- cgit