summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/test
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-06-13 02:31:30 +1000
committerGitHub <noreply@github.com>2024-06-12 18:31:30 +0200
commit51caf09cc9b0c24aec9c9f82e895ff1529cc8cb1 (patch)
treeb7a871fae8a96560fddbb2a4999756079c84d58e /src/main/java/at/hannibal2/skyhanni/test
parent488c0e3de136943604e21bee4f49969bd3121895 (diff)
downloadskyhanni-51caf09cc9b0c24aec9c9f82e895ff1529cc8cb1.tar.gz
skyhanni-51caf09cc9b0c24aec9c9f82e895ff1529cc8cb1.tar.bz2
skyhanni-51caf09cc9b0c24aec9c9f82e895ff1529cc8cb1.zip
Backend: No more GriffinUtils, move drawWaypointFilled to RenderUtils (#1930)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/GraphEditor.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt55
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt2
3 files changed, 2 insertions, 57 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/GraphEditor.kt b/src/main/java/at/hannibal2/skyhanni/test/GraphEditor.kt
index 618e2d861..318486440 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/GraphEditor.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/GraphEditor.kt
@@ -10,7 +10,6 @@ import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
-import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.ColorUtils
@@ -26,6 +25,7 @@ import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.OSUtils
import at.hannibal2.skyhanni.utils.RenderUtils.draw3DLine_nea
import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
+import at.hannibal2.skyhanni.utils.RenderUtils.drawWaypointFilled
import at.hannibal2.skyhanni.utils.RenderUtils.renderStrings
import kotlinx.coroutines.runBlocking
import net.minecraft.client.settings.KeyBinding
diff --git a/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt b/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt
deleted file mode 100644
index 195f06989..000000000
--- a/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt
+++ /dev/null
@@ -1,55 +0,0 @@
-package at.hannibal2.skyhanni.test
-
-import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
-import at.hannibal2.skyhanni.utils.LorenzVec
-import at.hannibal2.skyhanni.utils.RenderUtils
-import at.hannibal2.skyhanni.utils.RenderUtils.expandBlock
-import net.minecraft.client.renderer.GlStateManager
-import net.minecraft.util.AxisAlignedBB
-import java.awt.Color
-
-object GriffinUtils {
-
- fun LorenzRenderWorldEvent.drawWaypointFilled(
- location: LorenzVec,
- color: Color,
- seeThroughBlocks: Boolean = false,
- beacon: Boolean = false,
- extraSize: Double = 0.0,
- extraSizeTopY: Double = extraSize,
- extraSizeBottomY: Double = extraSize,
- minimumAlpha: Float = 0.2f,
- inverseAlphaScale: 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
-
- if (seeThroughBlocks) {
- GlStateManager.disableDepth()
- }
-
- GlStateManager.disableCull()
- RenderUtils.drawFilledBoundingBox(
- @Suppress("ktlint:standard:argument-list-wrapping")
- AxisAlignedBB(
- x - extraSize, y - extraSizeBottomY, z - extraSize,
- x + 1 + extraSize, y + 1 + extraSizeTopY, z + 1 + extraSize,
- ).expandBlock(),
- color,
- if (inverseAlphaScale) (1.0f - 0.005f * distSq.toFloat()).coerceAtLeast(minimumAlpha)
- else (0.1f + 0.005f * distSq.toFloat()).coerceAtLeast(minimumAlpha),
- )
- GlStateManager.disableTexture2D()
- if (distSq > 5 * 5 && beacon) RenderUtils.renderBeaconBeam(x, y + 1, z, color.rgb, 1.0f, partialTicks)
- GlStateManager.disableLighting()
- GlStateManager.enableTexture2D()
- GlStateManager.enableCull()
-
- if (seeThroughBlocks) {
- GlStateManager.enableDepth()
- }
- }
-}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
index a31816140..ec6c10db4 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
@@ -16,7 +16,6 @@ import at.hannibal2.skyhanni.events.ReceiveParticleEvent
import at.hannibal2.skyhanni.features.garden.GardenNextJacobContest
import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorColorNames
import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarApi.getBazaarData
-import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy
import at.hannibal2.skyhanni.utils.InventoryUtils
@@ -44,6 +43,7 @@ import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.OSUtils
import at.hannibal2.skyhanni.utils.ReflectionUtils.makeAccessible
import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
+import at.hannibal2.skyhanni.utils.RenderUtils.drawWaypointFilled
import at.hannibal2.skyhanni.utils.RenderUtils.renderRenderables
import at.hannibal2.skyhanni.utils.RenderUtils.renderString
import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems