aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/raeids/stratus/utils/RenderHelper.kt
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-01-01 17:39:01 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-01-01 17:39:01 +0700
commit856df4d08d3c392b35f256966f6263da86fdb7ab (patch)
treedab1e788630985ead522c0a073cfeaeb73ac2571 /src/main/kotlin/com/raeids/stratus/utils/RenderHelper.kt
parent503bbd969e929c42221d835c7f124940648100f2 (diff)
downloadChatting-856df4d08d3c392b35f256966f6263da86fdb7ab.tar.gz
Chatting-856df4d08d3c392b35f256966f6263da86fdb7ab.tar.bz2
Chatting-856df4d08d3c392b35f256966f6263da86fdb7ab.zip
fix text opacity ruining full shadow and fix full shadow with wyvtils
Diffstat (limited to 'src/main/kotlin/com/raeids/stratus/utils/RenderHelper.kt')
-rw-r--r--src/main/kotlin/com/raeids/stratus/utils/RenderHelper.kt5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/kotlin/com/raeids/stratus/utils/RenderHelper.kt b/src/main/kotlin/com/raeids/stratus/utils/RenderHelper.kt
index 8fd417b..9e454d7 100644
--- a/src/main/kotlin/com/raeids/stratus/utils/RenderHelper.kt
+++ b/src/main/kotlin/com/raeids/stratus/utils/RenderHelper.kt
@@ -21,11 +21,12 @@ import java.lang.reflect.Method
import java.nio.ByteBuffer
import java.nio.ByteOrder
import javax.imageio.ImageIO
-import kotlin.math.roundToInt
object RenderHelper {
private val regex = Regex("(?i)\\u00A7[0-9a-f]")
+ var bypassWyvtils = false
+ private set
/**
* Taken from https://github.com/Moulberry/HyChat
@@ -228,6 +229,7 @@ object RenderHelper {
val noColors = text.replace(regex, "\u00A7r")
var yes = 0
if (((Minecraft.getMinecraft().ingameGUI.chatGUI as GuiNewChatHook).textOpacity / 4) > 3) {
+ bypassWyvtils = true
for (xOff in -2..2) {
for (yOff in -2..2) {
if (xOff * xOff != yOff * yOff) {
@@ -238,6 +240,7 @@ object RenderHelper {
}
}
}
+ bypassWyvtils = false
}
yes += fontRendererIn.drawString(text, x, y, color)
return yes