diff options
author | Appability <appable@icloud.com> | 2022-10-18 00:31:32 -0700 |
---|---|---|
committer | Appability <appable@icloud.com> | 2022-10-18 00:31:32 -0700 |
commit | 1b6bd76b7e5c2f462bf55f0753ef459b445dcfb6 (patch) | |
tree | 5e7fe9efc953ccd836e9828fdeb35fc1d90ceb2a /src/main/kotlin/com/ambientaddons/utils/render/EntityUtils.kt | |
parent | fcd49c8b59f9c76008b5112a2e296c164b168842 (diff) | |
download | AmbientAddons-1b6bd76b7e5c2f462bf55f0753ef459b445dcfb6.tar.gz AmbientAddons-1b6bd76b7e5c2f462bf55f0753ef459b445dcfb6.tar.bz2 AmbientAddons-1b6bd76b7e5c2f462bf55f0753ef459b445dcfb6.zip |
crimson features!
Diffstat (limited to 'src/main/kotlin/com/ambientaddons/utils/render/EntityUtils.kt')
-rw-r--r-- | src/main/kotlin/com/ambientaddons/utils/render/EntityUtils.kt | 16 |
1 files changed, 13 insertions, 3 deletions
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<Float, Float, Float> = Triple(0F, 0F, 0F), + expansion: Triple<Double, Double, Double> = 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() |