From 1b6bd76b7e5c2f462bf55f0753ef459b445dcfb6 Mon Sep 17 00:00:00 2001 From: Appability Date: Tue, 18 Oct 2022 00:31:32 -0700 Subject: crimson features! --- .../kotlin/com/ambientaddons/utils/render/EntityUtils.kt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/main/kotlin/com/ambientaddons/utils/render/EntityUtils.kt') diff --git a/src/main/kotlin/com/ambientaddons/utils/render/EntityUtils.kt b/src/main/kotlin/com/ambientaddons/utils/render/EntityUtils.kt index c5bc2e9..333ace4 100644 --- a/src/main/kotlin/com/ambientaddons/utils/render/EntityUtils.kt +++ b/src/main/kotlin/com/ambientaddons/utils/render/EntityUtils.kt @@ -17,7 +17,7 @@ import kotlin.math.cos import kotlin.math.sin -// diretly stolen from Harry282/Skyblock-Client +// directly stolen from Harry282/Skyblock-Client object EntityUtils { private fun drawFilledAABB(aabb: AxisAlignedBB, color: Color, alpha: Float = 0.5f) { val tessellator = Tessellator.getInstance() @@ -239,7 +239,16 @@ object EntityUtils { } } - fun drawEntityBox(entity: Entity, color: Color, outline: Boolean, fill: Boolean, esp: Boolean, partialTicks: Float) { + fun drawEntityBox( + entity: Entity, + color: Color, + outline: Boolean, + fill: Boolean, + esp: Boolean, + partialTicks: Float, + offset: Triple = Triple(0F, 0F, 0F), + expansion: Triple = Triple(0.0, 0.0, 0.0), + ) { if (!outline && !fill) return val renderManager = mc.renderManager val x = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * partialTicks - renderManager.viewerPosX @@ -255,7 +264,8 @@ object EntityUtils { maxX - entity.posX, maxY - entity.posY, maxZ - entity.posZ - ).offset(x, y, z) + ).offset(x + offset.first, y + offset.second, z + offset.third) + .expand(expansion.first, expansion.second, expansion.third) } glPushMatrix() -- cgit