Skip to content

Commit 1448670

Browse files
committed
fix nametag background when the item name is longer than the entity name
1 parent c61fe63 commit 1448670

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/main/kotlin/com/lambda/module/modules/render

src/main/kotlin/com/lambda/module/modules/render/Nametags.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ object Nametags : Module(
163163
val maxWidth =
164164
if (itemName) max(itemNameWidth, combinedWidth)
165165
else combinedWidth
166-
screenRect(nameX - trueBGSizeX, anchorY - trueBGSizeY, maxWidth + (trueBGSizeX * 2), textSize + itemNameSize + trueSpacingY + (trueBGSizeY * 2), backgroundColor)
166+
screenRect((anchorX - (maxWidth * 0.5f)) - trueBGSizeX, anchorY - trueBGSizeY, maxWidth + (trueBGSizeX * 2), textSize + itemNameSize + trueSpacingY + (trueBGSizeY * 2), backgroundColor)
167167
}
168168

169169
if (itemName) {

0 commit comments

Comments
 (0)