diff options
| author | syeyoung <cyong06@naver.com> | 2021-02-02 02:14:06 +0900 |
|---|---|---|
| committer | syeyoung <cyong06@naver.com> | 2021-02-02 02:14:06 +0900 |
| commit | 72abcd5f751f8bcb76c3bee866b0d3a7eed5f831 (patch) | |
| tree | 47e3d35285f7e98634faef3f8d3b88b04d502f61 /src/main/java/kr/syeyoung/dungeonsguide/utils | |
| parent | b4635fcf7c42b21fef36dce5c7a601e4825d394b (diff) | |
| download | Skyblock-Dungeons-Guide-72abcd5f751f8bcb76c3bee866b0d3a7eed5f831.tar.gz Skyblock-Dungeons-Guide-72abcd5f751f8bcb76c3bee866b0d3a7eed5f831.tar.bz2 Skyblock-Dungeons-Guide-72abcd5f751f8bcb76c3bee866b0d3a7eed5f831.zip | |
puzzle solvers
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/utils')
| -rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/utils/MapUtils.java | 4 | ||||
| -rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/utils/MapUtils.java b/src/main/java/kr/syeyoung/dungeonsguide/utils/MapUtils.java index ea08c8b6..6666043f 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/utils/MapUtils.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/utils/MapUtils.java @@ -62,12 +62,14 @@ public class MapUtils { } public static Point findFirstColorWithIn(byte[] colors, byte color, Rectangle dimension) { + boolean found = true; for (int y = dimension.y; y < (dimension.y + dimension.height);y++) { for (int x = dimension.x; x < (dimension.x + dimension.width); x ++) { - if (getMapColorAt(colors, x ,y) == color) { + if (getMapColorAt(colors, x ,y) == color && found) { record(colors, x, y, new Color(255, 0, 0, 40)); return new Point(x,y); } + found = getMapColorAt(colors, x,y) == 0; } } return null; diff --git a/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java b/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java index cb3c762f..68243d84 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java @@ -200,12 +200,13 @@ public class RenderUtils { GlStateManager.disableTexture2D(); GlStateManager.enableBlend(); GlStateManager.disableAlpha(); + GL11.glLineWidth(2); if (!depth) { GlStateManager.disableDepth(); GlStateManager.depthMask(false); } GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); - GL11.glLineWidth(2); + GlStateManager.color(colour.getRed() / 255f, colour.getGreen() / 255f, colour.getBlue()/ 255f, colour.getAlpha() / 255f); worldRenderer.begin(GL11.GL_LINE_STRIP, DefaultVertexFormats.POSITION); for (BlockPos pos:poses) { |
