рендерим текст во всю ширину блока
font.width выдаёт ширину на 1 пиксель больше, так что чем больше текст тем больше смещение от этого самого пикселя
This commit is contained in:
parent
29ab315e43
commit
bb7d3425f4
@ -38,7 +38,7 @@ class HoloSignRenderer(private val context: BlockEntityRendererProvider.Context)
|
||||
if (tile.textAutoScale) {
|
||||
val totalWidth = lines.maxOf { font.width(it) }.toFloat()
|
||||
val highest = totalWidth.coerceAtLeast(totalHeight)
|
||||
val mul = if (highest > 64f) 1f / (highest / 64f) else 64f / highest
|
||||
val mul = if (highest > 96f) 1f / (highest / 96f) else 96f / highest
|
||||
poseStack.scale(mul, mul, mul)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user