From 81cd4ccdf8b47a1cf7a07978535af3839ed2306f Mon Sep 17 00:00:00 2001 From: odtheking Date: Tue, 30 Apr 2024 22:17:47 +0300 Subject: [PATCH] The hallucinations are real --- .../odin/features/impl/render/EtherWarpHelper.kt | 4 +--- .../features/impl/render/EtherWarpHelper.kt | 2 +- .../features/impl/render/ClickGUIModule.kt | 15 +++++++++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/odin/src/main/kotlin/me/odin/features/impl/render/EtherWarpHelper.kt b/odin/src/main/kotlin/me/odin/features/impl/render/EtherWarpHelper.kt index 9db9c73f2..25445cdd4 100644 --- a/odin/src/main/kotlin/me/odin/features/impl/render/EtherWarpHelper.kt +++ b/odin/src/main/kotlin/me/odin/features/impl/render/EtherWarpHelper.kt @@ -45,11 +45,9 @@ object EtherWarpHelper : Module( if (render && mc.thePlayer.isSneaking && mc.thePlayer.heldItem.extraAttributes?.getBoolean("ethermerge") == true && (etherPos.succeeded || renderFail)) { val pos = etherPos.pos ?: return val color = if (etherPos.succeeded) renderColor else wrongColor - val aabb = getBlockAt(pos).getSelectedBoundingBox(mc.theWorld, pos) ?: return + val aabb = getBlockAt(pos).getSelectedBoundingBox(mc.theWorld, pos).expand(0.002, 0.002, 0.002) ?: return Renderer.drawBox(aabb, color, outlineWidth = thickness, depth = phase, outlineAlpha = if (style == 0) 0 else color.alpha, fillAlpha = if (style == 1) 0 else color.alpha) } } - - } \ No newline at end of file diff --git a/odinclient/src/main/kotlin/me/odinclient/features/impl/render/EtherWarpHelper.kt b/odinclient/src/main/kotlin/me/odinclient/features/impl/render/EtherWarpHelper.kt index 6bbb81be8..7faddc13a 100644 --- a/odinclient/src/main/kotlin/me/odinclient/features/impl/render/EtherWarpHelper.kt +++ b/odinclient/src/main/kotlin/me/odinclient/features/impl/render/EtherWarpHelper.kt @@ -77,7 +77,7 @@ object EtherWarpHelper : Module( val pos = etherPos.pos ?: return val color = if (etherPos.succeeded) renderColor else wrongColor getBlockAt(pos).setBlockBoundsBasedOnState(mc.theWorld, pos) - val aabb = getBlockAt(pos).getSelectedBoundingBox(mc.theWorld, pos) ?: return + val aabb = getBlockAt(pos).getSelectedBoundingBox(mc.theWorld, pos).expand(0.002, 0.002, 0.002) ?: return Renderer.drawBox(aabb, color, outlineWidth = thickness, depth = phase, outlineAlpha = if (style == 0) 0 else color.alpha, fillAlpha = if (style == 1) 0 else color.alpha) } diff --git a/odinmain/src/main/kotlin/me/odinmain/features/impl/render/ClickGUIModule.kt b/odinmain/src/main/kotlin/me/odinmain/features/impl/render/ClickGUIModule.kt index 703489389..aeea271fd 100644 --- a/odinmain/src/main/kotlin/me/odinmain/features/impl/render/ClickGUIModule.kt +++ b/odinmain/src/main/kotlin/me/odinmain/features/impl/render/ClickGUIModule.kt @@ -20,6 +20,8 @@ import me.odinmain.utils.skyblock.getChatBreak import me.odinmain.utils.skyblock.modMessage import net.minecraft.event.ClickEvent import net.minecraft.util.ChatComponentText +import net.minecraftforge.event.world.WorldEvent +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import org.lwjgl.input.Keyboard @AlwaysActive @@ -99,11 +101,16 @@ object ClickGUIModule: Module( """.trimIndent(), false) } resetPositions() + } - @Suppress("OPT_IN_USAGE") - GlobalScope.launch { - sendDataToServer(body = """{"username": "${mc.thePlayer.name}", "version": "${if (OdinMain.isLegitVersion) "legit" else "cheater"} ${OdinMain.VERSION}"}""") - } + private var hasSent = false + + @OptIn(DelicateCoroutinesApi::class) + @SubscribeEvent + fun onWorldLoad(event: WorldEvent.Load) = GlobalScope.launch { + if (hasSent) return@launch + hasSent = true + sendDataToServer(body = """{"username": "${mc.thePlayer.name}", "version": "${if (OdinMain.isLegitVersion) "legit" else "cheater"} ${OdinMain.VERSION}"}""") } fun resetPositions() {