From 51616771a0ebb98b7b63703562ad334ac418d1a6 Mon Sep 17 00:00:00 2001 From: Lorenz Date: Tue, 23 Aug 2022 13:00:01 +0200 Subject: added display to show last time a minion was cleared --- src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt | 16 +++++++++++----- src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt | 12 +++++++++++- 2 files changed, 22 insertions(+), 6 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/test') diff --git a/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt b/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt index bfbb95302..70ebb954f 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt @@ -16,14 +16,17 @@ object GriffinUtils { GriffinJavaUtils.drawWaypoint(location, partialTicks, color.toColor(), beacon) } - fun RenderWorldLastEvent.drawWaypointFilled(location: LorenzVec, color: Color, beacon: Boolean = false) { + fun RenderWorldLastEvent.drawWaypointFilled(location: LorenzVec, color: Color, seeThroughBlocks: Boolean = false, beacon: Boolean = false) { val (viewerX, viewerY, viewerZ) = RenderUtils.getViewerPos(partialTicks) val x = location.x - viewerX val y = location.y - viewerY val z = location.z - viewerZ val distSq = x * x + y * y + z * z - GlStateManager.disableDepth() - GlStateManager.disableCull() + + if (seeThroughBlocks) { + GlStateManager.disableDepth() + GlStateManager.disableCull() + } RenderUtils.drawFilledBoundingBox( AxisAlignedBB(x, y, z, x + 1, y + 1, z + 1).expandBlock(), color, @@ -33,8 +36,11 @@ object GriffinUtils { if (distSq > 5 * 5 && beacon) RenderUtils.renderBeaconBeam(x, y + 1, z, color.rgb, 1.0f, partialTicks) GlStateManager.disableLighting() GlStateManager.enableTexture2D() - GlStateManager.enableDepth() - GlStateManager.enableCull() + + if (seeThroughBlocks) { + GlStateManager.enableDepth() + GlStateManager.enableCull() + } } fun RenderWorldLastEvent.draw3DLine( diff --git a/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt b/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt index 67f00bee9..851a8c207 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt @@ -37,7 +37,17 @@ class LorenzTest { } fun testCommand(args: Array) { - togglePacketLog = !togglePacketLog +// togglePacketLog = !togglePacketLog + +// for (line in (Minecraft.getMinecraft().ingameGUI.tabList as AccessorGuiPlayerTabOverlay).footer.unformattedText +// .split("\n")) { +// println("footer: '$line'") +// } +// +// +// for (line in TabListUtils.getTabList()) { +// println("tablist: '$line'") +// } } } -- cgit