diff options
author | syeyoung <42869671+cyoung06@users.noreply.github.com> | 2020-11-26 13:02:20 +0900 |
---|---|---|
committer | syeyoung <42869671+cyoung06@users.noreply.github.com> | 2020-11-26 13:02:20 +0900 |
commit | 4d5276d8523e5c4771bdde386c9a538ec544d4c5 (patch) | |
tree | 9c504ad9c1e441caa4f50cb1e78b00b91fa023ca /src/main/java/kr/syeyoung/dungeonsguide/utils | |
parent | 4ada6858039f3ca2f5de3c81df8c78f481d897d4 (diff) | |
download | Skyblock-Dungeons-Guide-4d5276d8523e5c4771bdde386c9a538ec544d4c5.tar.gz Skyblock-Dungeons-Guide-4d5276d8523e5c4771bdde386c9a538ec544d4c5.tar.bz2 Skyblock-Dungeons-Guide-4d5276d8523e5c4771bdde386c9a538ec544d4c5.zip |
value edit stuff
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/utils')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java b/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java index 8207e7d7..bc741e04 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java @@ -163,6 +163,75 @@ public class RenderUtils { //... } + public static void highlightBlock2(BlockPos blockpos, Color c, float partialTicks) { + + RenderManager renderManager = Minecraft.getMinecraft().getRenderManager(); + + Vector3f renderPos = getRenderPos(blockpos.getX(), blockpos.getY(), blockpos.getZ(), partialTicks); + + + GL11.glPushMatrix(); + GlStateManager.pushAttrib(); + GL11.glTranslatef(renderPos.x, renderPos.y, renderPos.z); + GL11.glRotatef(-renderManager.playerViewY, 0.0f, 1.0f, 0.0f); + GL11.glRotatef(renderManager.playerViewX, 1.0f, 0.0f, 0.0f); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDepthMask(false); + GL11.glDisable(GL11.GL_DEPTH_TEST); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GlStateManager.disableTexture2D(); + + GL11.glColor4ub((byte)c.getRed(), (byte)c.getGreen(), (byte)c.getBlue(), (byte)c.getAlpha()); + + GL11.glBegin(GL11.GL_QUADS); + GL11.glVertex3d(0, 0, 0); + GL11.glVertex3d(0, 0, 1); + GL11.glVertex3d(0, 1, 1); + GL11.glVertex3d(0, 1, 0); // TOP LEFT / BOTTOM LEFT / TOP RIGHT/ BOTTOM RIGHT + + GL11.glVertex3d(1, 0, 1); + GL11.glVertex3d(1, 0, 0); + GL11.glVertex3d(1, 1, 0); + GL11.glVertex3d(1, 1, 1); + + GL11.glVertex3d(0, 1, 1); + GL11.glVertex3d(0, 0, 1); + GL11.glVertex3d(1, 0, 1); + GL11.glVertex3d(1, 1, 1); // TOP LEFT / BOTTOM LEFT / TOP RIGHT/ BOTTOM RIGHT + + GL11.glVertex3d(0, 0, 0); + GL11.glVertex3d(0, 1, 0); + GL11.glVertex3d(1, 1, 0); + GL11.glVertex3d(1, 0, 0); + + GL11.glVertex3d(0,1,0); + GL11.glVertex3d(0,1,1); + GL11.glVertex3d(1,1,1); + GL11.glVertex3d(1,1,0); + + GL11.glVertex3d(0,0,1); + GL11.glVertex3d(0,0,0); + GL11.glVertex3d(1,0,0); + GL11.glVertex3d(1,0,1); + + + + GL11.glEnd(); + + + GL11.glEnable(GL11.GL_DEPTH_TEST); + GL11.glDepthMask(true); + GlStateManager.enableTexture2D(); + GlStateManager.disableBlend(); + GlStateManager.enableLighting(); + GlStateManager.popMatrix(); + GlStateManager.popAttrib(); + + +//... + + } public static void drawTextAtWorld(String text, float x, float y, float z, int color, float scale, boolean increase, boolean renderBlackBox, float partialTicks) { float lScale = scale; |