Fix font rendering
Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
c204db0d47
commit
c58eee6631
|
@ -15,6 +15,7 @@ import fr.username404.snowygui.utils.RenderingUtil.prepareDraw
|
|||
import fr.username404.snowygui.utils.RenderingUtil.tessellator
|
||||
import io.github.config4k.extract
|
||||
import net.minecraft.client.Minecraft
|
||||
import net.minecraft.client.gui.Font
|
||||
import net.minecraft.client.gui.GuiGraphics
|
||||
import net.minecraft.network.chat.Component
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
|
@ -115,6 +116,13 @@ class ClickBox(
|
|||
}.display(guiGraphics)
|
||||
}
|
||||
}
|
||||
guiGraphics?.drawString(Minecraft.getInstance().font, name.string, (x + 5).toInt(), (y + 2).toInt(), Colors.TRANSPARENT.hexValue, false)
|
||||
guiGraphics?.run {
|
||||
with(Minecraft.getInstance().font) {
|
||||
drawInBatch(name.string,
|
||||
(x + 5).toFloat(), (y + 2).toFloat(), Colors.TRANSPARENT.hexValue, false,
|
||||
pose().last().pose(), bufferSource(), Font.DisplayMode.NORMAL, 0, 15728880, isBidirectional
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue