From e610477599d3031471591b7f17a850954e509274 Mon Sep 17 00:00:00 2001 From: Lorenz Date: Wed, 24 Aug 2022 12:31:57 +0200 Subject: changing the size of the render blocks for minions, ashfang blazing souls and gravity orbs --- .../skyhanni/features/minion/MinionFeatures.kt | 7 ++++++- .../features/nether/ashfang/AshfangBlazingSouls.kt | 2 +- .../features/nether/ashfang/AshfangGravityOrbs.kt | 2 +- .../java/at/hannibal2/skyhanni/test/GriffinUtils.kt | 19 ++++++++++++++++--- 4 files changed, 24 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt index 697c8bbb2..455349a35 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt @@ -73,7 +73,12 @@ class MinionFeatures { if (loc != null) { val time = SkyHanniMod.feature.minions.lastOpenedMinionTime * 1_000 if (lastMinionOpened + time > System.currentTimeMillis()) { - event.drawWaypointFilled(loc.add(-0.5, 0.0, -0.5), color, true) + event.drawWaypointFilled(loc.add(-0.5, 0.0, -0.5), + color, + true, + extraSize = -0.25, + extraSizeTopY = 0.2, + extraSizeBottomY = 0.0) } } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt index 734db29ea..2ae0908a2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt @@ -44,7 +44,7 @@ class AshfangBlazingSouls { for (orb in souls) { if (orb.isDead) continue val orbLocation = orb.getLorenzVec() - event.drawWaypointFilled(orbLocation.add(-0.5, 1.25, -0.5), color) + event.drawWaypointFilled(orbLocation.add(-0.5, 1.25, -0.5), color, extraSize = -0.15) if (orbLocation.distance(playerLocation) < 10) { //TODO find way to dynamically change color event.drawString(orbLocation.add(0.0, 2.5, 0.0), "§bBlazing Soul") diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt index 59a128957..6a6f991f1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt @@ -45,7 +45,7 @@ class AshfangGravityOrbs { for (orb in orbs) { if (orb.isDead) continue val orbLocation = orb.getLorenzVec() - event.drawWaypointFilled(orbLocation.add(-0.5, 1.25, -0.5), color) + event.drawWaypointFilled(orbLocation.add(-0.5, 1.25, -0.5), color, extraSize = 1.0) if (orbLocation.distance(playerLocation) < 15) { //TODO find way to dynamically change color event.drawString(orbLocation.add(0.0, 2.5, 0.0), "§cGravity Orb") diff --git a/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt b/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt index 70ebb954f..d9da2745c 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt @@ -16,7 +16,15 @@ object GriffinUtils { GriffinJavaUtils.drawWaypoint(location, partialTicks, color.toColor(), beacon) } - fun RenderWorldLastEvent.drawWaypointFilled(location: LorenzVec, color: Color, seeThroughBlocks: Boolean = false, beacon: Boolean = false) { + fun RenderWorldLastEvent.drawWaypointFilled( + location: LorenzVec, + color: Color, + seeThroughBlocks: Boolean = false, + beacon: Boolean = false, + extraSize: Double = 0.0, + extraSizeTopY: Double = extraSize, + extraSizeBottomY: Double = extraSize + ) { val (viewerX, viewerY, viewerZ) = RenderUtils.getViewerPos(partialTicks) val x = location.x - viewerX val y = location.y - viewerY @@ -28,7 +36,12 @@ object GriffinUtils { GlStateManager.disableCull() } RenderUtils.drawFilledBoundingBox( - AxisAlignedBB(x, y, z, x + 1, y + 1, z + 1).expandBlock(), + AxisAlignedBB(x - extraSize, + y - extraSizeBottomY, + z - extraSize, + x + 1 + extraSize, + y + 1 + extraSizeTopY, + z + 1 + extraSize).expandBlock(), color, (0.1f + 0.005f * distSq.toFloat()).coerceAtLeast(0.2f) ) @@ -48,7 +61,7 @@ object GriffinUtils { p2: LorenzVec, color: LorenzColor, lineWidth: Int, - depth: Boolean + depth: Boolean, ) { GriffinJavaUtils.draw3DLine(p1, p2, color.toColor(), lineWidth, depth, partialTicks) -- cgit