diff --git a/odinmain/src/main/kotlin/me/odinmain/features/impl/render/DVD.kt b/odinmain/src/main/kotlin/me/odinmain/features/impl/render/DVD.kt index 9e3a7877e..f5952bb76 100644 --- a/odinmain/src/main/kotlin/me/odinmain/features/impl/render/DVD.kt +++ b/odinmain/src/main/kotlin/me/odinmain/features/impl/render/DVD.kt @@ -4,10 +4,7 @@ import me.odinmain.features.Category import me.odinmain.features.Module import me.odinmain.features.settings.impl.NumberSetting import me.odinmain.features.settings.impl.StringSetting -import me.odinmain.utils.render.Color -import me.odinmain.utils.render.getMCTextHeight -import me.odinmain.utils.render.mcText -import me.odinmain.utils.render.roundedRectangle +import me.odinmain.utils.render.* import me.odinmain.utils.skyblock.PlayerUtils import me.odinmain.utils.skyblock.modMessage import net.minecraft.client.gui.ScaledResolution @@ -43,7 +40,8 @@ object DVD : Module( } @SubscribeEvent - fun onRenderOverlay(event: RenderGameOverlayEvent) { + fun onRenderOverlay(event: RenderGameOverlayEvent.Post) { + if (event.type != RenderGameOverlayEvent.ElementType.ALL) return roundedRectangle(x, y, boxWidth, boxHeight, color, 9f) mcText(text, x + boxWidth / 2, y + boxHeight / 2 - getMCTextHeight() * textScale / 2 , textScale, color, true) } diff --git a/odinmain/src/main/kotlin/me/odinmain/utils/render/RenderUtils.kt b/odinmain/src/main/kotlin/me/odinmain/utils/render/RenderUtils.kt index 5c1b9351e..b7fffd6b4 100644 --- a/odinmain/src/main/kotlin/me/odinmain/utils/render/RenderUtils.kt +++ b/odinmain/src/main/kotlin/me/odinmain/utils/render/RenderUtils.kt @@ -7,9 +7,7 @@ import me.odinmain.OdinMain.mc import me.odinmain.ui.clickgui.util.ColorUtil.withAlpha import me.odinmain.utils.* import net.minecraft.block.Block -import net.minecraft.client.renderer.GlStateManager -import net.minecraft.client.renderer.Tessellator -import net.minecraft.client.renderer.WorldRenderer +import net.minecraft.client.renderer.* import net.minecraft.client.renderer.entity.RenderManager import net.minecraft.client.renderer.texture.TextureUtil import net.minecraft.client.renderer.vertex.DefaultVertexFormats @@ -682,7 +680,6 @@ object RenderUtils { val xOffset = if (center) mc.fontRendererObj.getStringWidth(it) / -2f else 0f mc.fontRendererObj.drawString(it, xOffset, 0f, color.rgba, shadow) } - Color.WHITE.bind() GlStateManager.disableBlend() GlStateManager.popMatrix() }