diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-12 06:37:39 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-12 06:37:39 +0200 |
commit | 8e41ca93ab22eb4807beaa7447e19455f992ab76 (patch) | |
tree | 10f2e4640ec2bee01329ba08f672ce8294d43dbd /src/main/java/at/hannibal2/skyhanni/utils | |
parent | 0344ab23929f77f4f339cb0dc83d84d3f118d679 (diff) | |
download | skyhanni-8e41ca93ab22eb4807beaa7447e19455f992ab76.tar.gz skyhanni-8e41ca93ab22eb4807beaa7447e19455f992ab76.tar.bz2 skyhanni-8e41ca93ab22eb4807beaa7447e19455f992ab76.zip |
Added Highlight flying Motes Orbs
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt index 66cbb79b1..a6efd2355 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt @@ -812,7 +812,8 @@ object RenderUtils { } fun RenderWorldLastEvent.draw3DLine( - p1: LorenzVec, p2: LorenzVec, color: Color, lineWidth: Int, depth: Boolean, targetColor: Color? = null + p1: LorenzVec, p2: LorenzVec, color: Color, lineWidth: Int, depth: Boolean, targetColor: Color? = null, + seeThroughBlocks: Boolean = true ) { val render = Minecraft.getMinecraft().renderViewEntity val worldRenderer = Tessellator.getInstance().worldRenderer @@ -820,7 +821,9 @@ object RenderUtils { val realY = render.lastTickPosY + (render.posY - render.lastTickPosY) * partialTicks val realZ = render.lastTickPosZ + (render.posZ - render.lastTickPosZ) * partialTicks GlStateManager.pushMatrix() - GlStateManager.disableDepth() + if (!seeThroughBlocks) { + GlStateManager.disableDepth() + } GlStateManager.disableCull() GlStateManager.disableLighting() GlStateManager.translate(-realX, -realY, -realZ) @@ -853,6 +856,9 @@ object RenderUtils { GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f) GlStateManager.popMatrix() GlStateManager.disableLighting() + if (!seeThroughBlocks) { + GlStateManager.enableDepth() + } } fun RenderWorldLastEvent.exactLocation(entity: Entity): LorenzVec { |