diff options
author | syeyoung <cyoung06@naver.com> | 2021-10-04 14:06:32 +0900 |
---|---|---|
committer | syeyoung <cyoung06@naver.com> | 2021-10-04 14:06:32 +0900 |
commit | a98c778b6e3398f265eeb56e1984c28aadb153bd (patch) | |
tree | bb8812236ae51b7a3077e4327820897cca1b99a1 /src/main/java/kr/syeyoung/dungeonsguide/utils | |
parent | dcd661c9108005b43f595d010c92d3221f866fb8 (diff) | |
download | Skyblock-Dungeons-Guide-a98c778b6e3398f265eeb56e1984c28aadb153bd.tar.gz Skyblock-Dungeons-Guide-a98c778b6e3398f265eeb56e1984c28aadb153bd.tar.bz2 Skyblock-Dungeons-Guide-a98c778b6e3398f265eeb56e1984c28aadb153bd.zip |
- Blood rush mode
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/utils')
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/utils/MapUtils.java | 2 | ||||
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java | 28 |
2 files changed, 27 insertions, 3 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/utils/MapUtils.java b/src/main/java/kr/syeyoung/dungeonsguide/utils/MapUtils.java index b8450870..f3bf6065 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/utils/MapUtils.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/utils/MapUtils.java @@ -18,6 +18,7 @@ package kr.syeyoung.dungeonsguide.utils; +import lombok.Getter; import net.minecraft.block.material.MapColor; import org.w3c.dom.css.Rect; @@ -28,6 +29,7 @@ import java.awt.image.BufferedImage; public class MapUtils { private static Color[] colorMasks = new Color[128 * 128]; + @Getter private static byte[] colors; public static void clearMap() { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java b/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java index 9efb7a78..21c30b78 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java @@ -482,7 +482,7 @@ public class RenderUtils { GlStateManager.disableCull(); GlStateManager.enableAlpha(); - if (dungeonDoor.isExist()) + if (dungeonDoor.getType().isExist()) GlStateManager.color(0,1,0,1); else GlStateManager.color(1,0,0,1); @@ -499,7 +499,7 @@ public class RenderUtils { GL11.glEnd(); - if (dungeonDoor.isExist()) { + if (dungeonDoor.getType().isExist()) { GL11.glBegin(GL11.GL_QUADS); GlStateManager.color(0,0,1,1); @@ -539,8 +539,30 @@ public class RenderUtils { GlStateManager.enableCull(); - GlStateManager.popMatrix(); + RenderManager renderManager = Minecraft.getMinecraft().getRenderManager(); + FontRenderer fontRenderer = Minecraft.getMinecraft().fontRendererObj; + + GlStateManager.translate( dungeonDoor.getPosition().getX(), dungeonDoor.getPosition().getY(), dungeonDoor.getPosition().getZ()); + GlStateManager.rotate(-renderManager.playerViewY, 0.0f, 1.0f, 0.0f); + GlStateManager.rotate(renderManager.playerViewX, 1.0f, 0.0f, 0.0f); + + float lScale = 0.02f; + GlStateManager.scale(-lScale, -lScale, lScale); + GlStateManager.disableLighting(); + GlStateManager.enableBlend(); + GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + String text = "Type: "+dungeonDoor.getType(); + int textWidth = fontRenderer.getStringWidth(text); + + Tessellator tessellator = Tessellator.getInstance(); + WorldRenderer worldRenderer = tessellator.getWorldRenderer(); + GlStateManager.enableBlend(); + GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA); + GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA); + fontRenderer.drawString(text, -textWidth / 2, 0, 0xFF00FFFF); + GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f); + GlStateManager.popMatrix(); } public static void drawLine(Vec3 pos1, Vec3 pos2, Color colour, float partialTicks , boolean depth) { |