aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-19 19:47:43 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-19 19:47:43 +0100
commit07ef4c86d07fa7105f9c20668264f16145fb074a (patch)
treecb75329fa02e9a9669324d1f778e5a253ba6fa62 /src/main/java/at
parenta24f581d2db52a0a7d396b512426f4b41c7abc60 (diff)
downloadskyhanni-07ef4c86d07fa7105f9c20668264f16145fb074a.tar.gz
skyhanni-07ef4c86d07fa7105f9c20668264f16145fb074a.tar.bz2
skyhanni-07ef4c86d07fa7105f9c20668264f16145fb074a.zip
Removed unnecessary removeColor calls
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
index 480be51d8..e7aa2b475 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
@@ -3,7 +3,6 @@ package at.hannibal2.skyhanni.utils
import at.hannibal2.skyhanni.config.core.config.Position
import at.hannibal2.skyhanni.config.core.util.render.TextRenderUtils.drawStringScaled
import at.hannibal2.skyhanni.utils.NEUItems.renderOnScreen
-import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.FontRenderer
import net.minecraft.client.gui.Gui
@@ -441,7 +440,7 @@ object RenderUtils {
val renderer = minecraft.renderManager.fontRenderer ?: return
val offsetX = if (center) {
- (200 - renderer.getStringWidth(display.removeColor())) / 2
+ (200 - renderer.getStringWidth(display)) / 2
} else {
0
} + extraOffsetX
@@ -512,7 +511,7 @@ object RenderUtils {
}
if (any is String) {
renderString(any, offsetX, offsetY, center = false)
- val width = renderer.getStringWidth(any.removeColor())
+ val width = renderer.getStringWidth(any)
offsetX += width
} else if (any is ItemStack) {
val isX = getAbsX(resolution, 200) + offsetX
@@ -723,7 +722,7 @@ object RenderUtils {
GlStateManager.rotate(-renderManager.playerViewY, 0.0f, 1.0f, 0.0f)
GlStateManager.rotate(renderManager.playerViewX, 1.0f, 0.0f, 0.0f)
GlStateManager.scale(-scale / 25, -scale / 25, scale / 25)
- val stringWidth = fontRenderer.getStringWidth(text.removeColor())
+ val stringWidth = fontRenderer.getStringWidth(text)
if (shadow) {
fontRenderer.drawStringWithShadow(
text,