From 6b3c433d06bcf45b9ba4dff91b1cc2776721511f Mon Sep 17 00:00:00 2001 From: IceTank <61137113+IceTank@users.noreply.github.com> Date: Sun, 22 Mar 2026 00:22:06 +0100 Subject: [PATCH] Fix invisible shulker preview container text Fix luminance check making most shulker name text hard to read --- .../com/lambda/module/modules/render/ContainerPreview.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/lambda/module/modules/render/ContainerPreview.kt b/src/main/kotlin/com/lambda/module/modules/render/ContainerPreview.kt index cf553fcd1..d92f54960 100644 --- a/src/main/kotlin/com/lambda/module/modules/render/ContainerPreview.kt +++ b/src/main/kotlin/com/lambda/module/modules/render/ContainerPreview.kt @@ -38,6 +38,7 @@ import net.minecraft.item.ItemStack import net.minecraft.item.Items import net.minecraft.item.tooltip.TooltipData import net.minecraft.screen.slot.Slot +import net.minecraft.util.Colors import net.minecraft.util.DyeColor import net.minecraft.util.Identifier @@ -98,7 +99,7 @@ object ContainerPreview : Module( val g = ((tintColor shr 8) and 0xFF) / 255f val b = (tintColor and 0xFF) / 255f val luminance = 0.299f * r + 0.587f * g + 0.114f * b - return if (luminance > 0.5f) 0x404040 else 0xFFFFFF + return if (luminance > 0.7f) Colors.DARK_GRAY else Colors.WHITE } @JvmStatic