aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-26 13:07:18 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-26 13:07:18 +0100
commitae48ef854f96fe5a6d60d9a52f9db680de77fdf3 (patch)
tree22085e5a85d22f0b628911defde894c4b751c3e4 /src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt
parent53c653bfa52bc9a07a4308a1840ea9f2eafe0bcc (diff)
downloadskyhanni-ae48ef854f96fe5a6d60d9a52f9db680de77fdf3.tar.gz
skyhanni-ae48ef854f96fe5a6d60d9a52f9db680de77fdf3.tar.bz2
skyhanni-ae48ef854f96fe5a6d60d9a52f9db680de77fdf3.zip
New sort logic.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt119
1 files changed, 4 insertions, 115 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt b/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt
index d9da2745c..8c2a39d46 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/GriffinUtils.kt
@@ -1,6 +1,5 @@
package at.hannibal2.skyhanni.test
-import at.hannibal2.skyhanni.utils.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.RenderUtils
import at.hannibal2.skyhanni.utils.RenderUtils.expandBlock
@@ -11,11 +10,6 @@ import java.awt.Color
object GriffinUtils {
-
- fun RenderWorldLastEvent.drawWaypoint(location: LorenzVec, color: LorenzColor, beacon: Boolean = false) {
- GriffinJavaUtils.drawWaypoint(location, partialTicks, color.toColor(), beacon)
- }
-
fun RenderWorldLastEvent.drawWaypointFilled(
location: LorenzVec,
color: Color,
@@ -36,12 +30,10 @@ object GriffinUtils {
GlStateManager.disableCull()
}
RenderUtils.drawFilledBoundingBox(
- AxisAlignedBB(x - extraSize,
- y - extraSizeBottomY,
- z - extraSize,
- x + 1 + extraSize,
- y + 1 + extraSizeTopY,
- z + 1 + extraSize).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)
)
@@ -55,107 +47,4 @@ object GriffinUtils {
GlStateManager.enableCull()
}
}
-
- fun RenderWorldLastEvent.draw3DLine(
- p1: LorenzVec,
- p2: LorenzVec,
- color: LorenzColor,
- lineWidth: Int,
- depth: Boolean,
- ) {
-
- GriffinJavaUtils.draw3DLine(p1, p2, color.toColor(), lineWidth, depth, partialTicks)
- }
-
-// fun renderBeaconBeam(x: Double, y: Double, z: Double, rgb: Int, alphaMultiplier: Float, partialTicks: Float) {
-// val height = 300
-// val bottomOffset = 0
-// val topOffset = bottomOffset + height
-// val tessellator = Tessellator.getInstance()
-// val worldrenderer = tessellator.worldRenderer
-//
-//// Skytils.mc.textureManager.bindTexture(RenderUtil.beaconBeam)
-// GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0f)
-// GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0f)
-// GlStateManager.disableLighting()
-// GlStateManager.enableCull()
-// GlStateManager.enableTexture2D()
-// GlStateManager.tryBlendFuncSeparate(770, 1, 1, 0)
-// GlStateManager.enableBlend()
-// GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0)
-// val time = Skytils.mc.theWorld.totalWorldTime + partialTicks.toDouble()
-// val d1 = MathHelper.func_181162_h(
-// -time * 0.2 - MathHelper.floor_double(-time * 0.1)
-// .toDouble()
-// )
-// val r = (rgb shr 16 and 0xFF) / 255f
-// val g = (rgb shr 8 and 0xFF) / 255f
-// val b = (rgb and 0xFF) / 255f
-// val d2 = time * 0.025 * -1.5
-// val d4 = 0.5 + cos(d2 + 2.356194490192345) * 0.2
-// val d5 = 0.5 + sin(d2 + 2.356194490192345) * 0.2
-// val d6 = 0.5 + cos(d2 + Math.PI / 4.0) * 0.2
-// val d7 = 0.5 + sin(d2 + Math.PI / 4.0) * 0.2
-// val d8 = 0.5 + cos(d2 + 3.9269908169872414) * 0.2
-// val d9 = 0.5 + sin(d2 + 3.9269908169872414) * 0.2
-// val d10 = 0.5 + cos(d2 + 5.497787143782138) * 0.2
-// val d11 = 0.5 + sin(d2 + 5.497787143782138) * 0.2
-// val d14 = -1.0 + d1
-// val d15 = height.toDouble() * 2.5 + d14
-// worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR)
-// worldrenderer.pos(x + d4, y + topOffset, z + d5).tex(1.0, d15).color(r, g, b, 1.0f * alphaMultiplier)
-// .endVertex()
-// worldrenderer.pos(x + d4, y + bottomOffset, z + d5).tex(1.0, d14).color(r, g, b, 1.0f).endVertex()
-// worldrenderer.pos(x + d6, y + bottomOffset, z + d7).tex(0.0, d14).color(r, g, b, 1.0f).endVertex()
-// worldrenderer.pos(x + d6, y + topOffset, z + d7).tex(0.0, d15).color(r, g, b, 1.0f * alphaMultiplier)
-// .endVertex()
-// worldrenderer.pos(x + d10, y + topOffset, z + d11).tex(1.0, d15).color(r, g, b, 1.0f * alphaMultiplier)
-// .endVertex()
-// worldrenderer.pos(x + d10, y + bottomOffset, z + d11).tex(1.0, d14).color(r, g, b, 1.0f).endVertex()
-// worldrenderer.pos(x + d8, y + bottomOffset, z + d9).tex(0.0, d14).color(r, g, b, 1.0f).endVertex()
-// worldrenderer.pos(x + d8, y + topOffset, z + d9).tex(0.0, d15).color(r, g, b, 1.0f * alphaMultiplier)
-// .endVertex()
-// worldrenderer.pos(x + d6, y + topOffset, z + d7).tex(1.0, d15).color(r, g, b, 1.0f * alphaMultiplier)
-// .endVertex()
-// worldrenderer.pos(x + d6, y + bottomOffset, z + d7).tex(1.0, d14).color(r, g, b, 1.0f).endVertex()
-// worldrenderer.pos(x + d10, y + bottomOffset, z + d11).tex(0.0, d14).color(r, g, b, 1.0f).endVertex()
-// worldrenderer.pos(x + d10, y + topOffset, z + d11).tex(0.0, d15).color(r, g, b, 1.0f * alphaMultiplier)
-// .endVertex()
-// worldrenderer.pos(x + d8, y + topOffset, z + d9).tex(1.0, d15).color(r, g, b, 1.0f * alphaMultiplier)
-// .endVertex()
-// worldrenderer.pos(x + d8, y + bottomOffset, z + d9).tex(1.0, d14).color(r, g, b, 1.0f).endVertex()
-// worldrenderer.pos(x + d4, y + bottomOffset, z + d5).tex(0.0, d14).color(r, g, b, 1.0f).endVertex()
-// worldrenderer.pos(x + d4, y + topOffset, z + d5).tex(0.0, d15).color(r, g, b, 1.0f * alphaMultiplier)
-// .endVertex()
-// tessellator.draw()
-// GlStateManager.disableCull()
-// val d12 = -1.0 + d1
-// val d13 = height + d12
-// worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR)
-// worldrenderer.pos(x + 0.2, y + topOffset, z + 0.2).tex(1.0, d13).color(r, g, b, 0.25f * alphaMultiplier)
-// .endVertex()
-// worldrenderer.pos(x + 0.2, y + bottomOffset, z + 0.2).tex(1.0, d12).color(r, g, b, 0.25f).endVertex()
-// worldrenderer.pos(x + 0.8, y + bottomOffset, z + 0.2).tex(0.0, d12).color(r, g, b, 0.25f).endVertex()
-// worldrenderer.pos(x + 0.8, y + topOffset, z + 0.2).tex(0.0, d13).color(r, g, b, 0.25f * alphaMultiplier)
-// .endVertex()
-// worldrenderer.pos(x + 0.8, y + topOffset, z + 0.8).tex(1.0, d13).color(r, g, b, 0.25f * alphaMultiplier)
-// .endVertex()
-// worldrenderer.pos(x + 0.8, y + bottomOffset, z + 0.8).tex(1.0, d12).color(r, g, b, 0.25f).endVertex()
-// worldrenderer.pos(x + 0.2, y + bottomOffset, z + 0.8).tex(0.0, d12).color(r, g, b, 0.25f).endVertex()
-// worldrenderer.pos(x + 0.2, y + topOffset, z + 0.8).tex(0.0, d13).color(r, g, b, 0.25f * alphaMultiplier)
-// .endVertex()
-// worldrenderer.pos(x + 0.8, y + topOffset, z + 0.2).tex(1.0, d13).color(r, g, b, 0.25f * alphaMultiplier)
-// .endVertex()
-// worldrenderer.pos(x + 0.8, y + bottomOffset, z + 0.2).tex(1.0, d12).color(r, g, b, 0.25f).endVertex()
-// worldrenderer.pos(x + 0.8, y + bottomOffset, z + 0.8).tex(0.0, d12).color(r, g, b, 0.25f).endVertex()
-// worldrenderer.pos(x + 0.8, y + topOffset, z + 0.8).tex(0.0, d13).color(r, g, b, 0.25f * alphaMultiplier)
-// .endVertex()
-// worldrenderer.pos(x + 0.2, y + topOffset, z + 0.8).tex(1.0, d13).color(r, g, b, 0.25f * alphaMultiplier)
-// .endVertex()
-// worldrenderer.pos(x + 0.2, y + bottomOffset, z + 0.8).tex(1.0, d12).color(r, g, b, 0.25f).endVertex()
-// worldrenderer.pos(x + 0.2, y + bottomOffset, z + 0.2).tex(0.0, d12).color(r, g, b, 0.25f).endVertex()
-// worldrenderer.pos(x + 0.2, y + topOffset, z + 0.2).tex(0.0, d13).color(r, g, b, 0.25f * alphaMultiplier)
-// .endVertex()
-// tessellator.draw()
-// }
} \ No newline at end of file