Skip to content

Commit 6f0375f

Browse files
authored
Fix invisible shulker name in ContainerPreview (#275)
1 parent c8431bc commit 6f0375f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import net.minecraft.item.ItemStack
3838
import net.minecraft.item.Items
3939
import net.minecraft.item.tooltip.TooltipData
4040
import net.minecraft.screen.slot.Slot
41+
import net.minecraft.util.Colors
4142
import net.minecraft.util.DyeColor
4243
import net.minecraft.util.Identifier
4344

@@ -98,7 +99,7 @@ object ContainerPreview : Module(
9899
val g = ((tintColor shr 8) and 0xFF) / 255f
99100
val b = (tintColor and 0xFF) / 255f
100101
val luminance = 0.299f * r + 0.587f * g + 0.114f * b
101-
return if (luminance > 0.5f) 0x404040 else 0xFFFFFF
102+
return if (luminance > 0.7f) Colors.DARK_GRAY else Colors.WHITE
102103
}
103104

104105
@JvmStatic

0 commit comments

Comments
 (0)