aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-29 21:32:56 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-29 21:32:56 +0200
commite477e43af5f771d31301c51a26340666120ef7f6 (patch)
treeeedccfe77cc3baef3b51e691e61613147b5b2616 /src/main/java/at/hannibal2/skyhanni/utils
parent68c9844d02e7ceb13b8dcf6f090cef5a8ce6f037 (diff)
downloadskyhanni-e477e43af5f771d31301c51a26340666120ef7f6.tar.gz
skyhanni-e477e43af5f771d31301c51a26340666120ef7f6.tar.bz2
skyhanni-e477e43af5f771d31301c51a26340666120ef7f6.zip
Added option to change the eman slayer beacon color.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt13
1 files changed, 11 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 22d6cdaf3..7544e7934 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
@@ -59,6 +59,15 @@ object RenderUtils {
beacon: Boolean = false,
alpha: Float = -1f,
) {
+ drawColor(location, color.toColor(), beacon, alpha)
+ }
+
+ fun RenderWorldLastEvent.drawColor(
+ location: LorenzVec,
+ color: Color,
+ beacon: Boolean = false,
+ alpha: Float = -1f,
+ ) {
val (viewerX, viewerY, viewerZ) = getViewerPos(partialTicks)
val x = location.x - viewerX
val y = location.y - viewerY
@@ -73,11 +82,11 @@ object RenderUtils {
GlStateManager.disableCull()
drawFilledBoundingBox(
AxisAlignedBB(x, y, z, x + 1, y + 1, z + 1).expandBlock(),
- color.toColor(),
+ color,
realAlpha
)
GlStateManager.disableTexture2D()
- if (distSq > 5 * 5 && beacon) renderBeaconBeam(x, y + 1, z, color.toColor().rgb, 1.0f, partialTicks)
+ if (distSq > 5 * 5 && beacon) renderBeaconBeam(x, y + 1, z, color.rgb, 1.0f, partialTicks)
GlStateManager.disableLighting()
GlStateManager.enableTexture2D()
GlStateManager.enableDepth()