From 8e3c95159aa65f53658c5eea14b2f2f8b578d803 Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Mon, 30 Oct 2023 22:40:07 +0300 Subject: [PATCH] display painter recipe name in advanced tooltips --- .../mc/otm/client/screen/decorative/PainterScreen.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/decorative/PainterScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/decorative/PainterScreen.kt index 555b059a7..9decd3d15 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/decorative/PainterScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/decorative/PainterScreen.kt @@ -32,7 +32,6 @@ import ru.dbotthepony.mc.otm.core.map import ru.dbotthepony.mc.otm.core.math.RGBAColor import ru.dbotthepony.mc.otm.core.util.CreativeMenuItemComparator import ru.dbotthepony.mc.otm.menu.decorative.PainterMenu -import ru.dbotthepony.mc.otm.recipe.PainterRecipe class PainterScreen(menu: PainterMenu, inventory: Inventory, title: Component) : MatteryScreen(menu, inventory, title) { private inner class Bar(parent: EditablePanel<*>, val dye: DyeColor?) : EditablePanel(this@PainterScreen, parent, width = 5f) { @@ -174,6 +173,10 @@ class PainterScreen(menu: PainterMenu, inventory: Inventory, title: Component) : } } + if (minecraft?.options?.advancedItemTooltips == true) { + list.add(TextComponent(recipe.id.toString()).withStyle(ChatFormatting.DARK_GRAY)) + } + graphics.renderComponentTooltip(font, list, mouseX.toInt(), mouseY.toInt()) return true }