Fix box width

Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
This commit is contained in:
Username404-59 2026-02-06 00:09:44 +01:00
parent 1c43549b8f
commit a20a2d2d8c
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1

View File

@ -15,6 +15,7 @@ import net.minecraft.util.ARGB
import org.jetbrains.annotations.ApiStatus import org.jetbrains.annotations.ApiStatus
import java.util.TreeSet import java.util.TreeSet
import kotlin.collections.LinkedHashSet import kotlin.collections.LinkedHashSet
import kotlin.math.roundToInt
@ApiStatus.Internal @ApiStatus.Internal
class ClickBox( class ClickBox(
@ -90,7 +91,7 @@ class ClickBox(
x = x, x = x,
y = (y + height), y = (y + height),
height = clickboxHeightOffset, height = clickboxHeightOffset,
width = width, width = width + inclination.roundToInt(),
color = color, color = color,
opacity = opacity opacity = opacity
) )
@ -98,7 +99,7 @@ class ClickBox(
// Separator line // Separator line
RenderingUtil.hLine( RenderingUtil.hLine(
guiGraphics = guiGraphics, guiGraphics = guiGraphics,
x1 = (x + 0).toInt(), x1 = (x + inclination).toInt(),
x2 = (x + width).toInt(), x2 = (x + width).toInt(),
y = (y + height).toInt(), y = (y + height).toInt(),
rgb = Colors.WHITE_LINES.hexValue, rgb = Colors.WHITE_LINES.hexValue,