diff options
author | Linnea Gräf <nea@nea.moe> | 2025-01-12 14:18:12 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2025-01-12 14:18:12 +0100 |
commit | 29bdb00b7f22cf3de58fda23459b65740199e278 (patch) | |
tree | 550d081eccb72c144563b0aa5b243e944a84643f | |
parent | ecc09597692421d677be9745778554b57f08488b (diff) | |
download | Firmament-29bdb00b7f22cf3de58fda23459b65740199e278.tar.gz Firmament-29bdb00b7f22cf3de58fda23459b65740199e278.tar.bz2 Firmament-29bdb00b7f22cf3de58fda23459b65740199e278.zip |
fix: Tooltips of other fabric mods not being displayed in REI
-rw-r--r-- | src/compat/rei/java/moe/nea/firmament/compat/rei/NEUItemEntryRenderer.kt | 3 | ||||
-rw-r--r-- | src/main/kotlin/events/FirmamentEventBus.kt | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/compat/rei/java/moe/nea/firmament/compat/rei/NEUItemEntryRenderer.kt b/src/compat/rei/java/moe/nea/firmament/compat/rei/NEUItemEntryRenderer.kt index a7b4c99..5430ea8 100644 --- a/src/compat/rei/java/moe/nea/firmament/compat/rei/NEUItemEntryRenderer.kt +++ b/src/compat/rei/java/moe/nea/firmament/compat/rei/NEUItemEntryRenderer.kt @@ -47,7 +47,7 @@ object NEUItemEntryRenderer : EntryRenderer<SBItemStack> { } val minecraft = MinecraftClient.getInstance() - var canUseVanillaTooltipEvents = false + var canUseVanillaTooltipEvents = true override fun getTooltip(entry: EntryStack<SBItemStack>, tooltipContext: TooltipContext): Tooltip? { val stack = entry.value.asImmutableItemStack() @@ -60,6 +60,7 @@ object NEUItemEntryRenderer : EntryRenderer<SBItemStack> { stack, tooltipContext.vanillaContext(), TooltipType.BASIC, lore ) } catch (ex: Exception) { + canUseVanillaTooltipEvents = false ErrorUtil.softError("Failed to use vanilla tooltips", ex) } } else { diff --git a/src/main/kotlin/events/FirmamentEventBus.kt b/src/main/kotlin/events/FirmamentEventBus.kt index 71331d1..af4e16a 100644 --- a/src/main/kotlin/events/FirmamentEventBus.kt +++ b/src/main/kotlin/events/FirmamentEventBus.kt @@ -3,6 +3,7 @@ package moe.nea.firmament.events import java.util.concurrent.CopyOnWriteArrayList import org.apache.commons.lang3.reflect.TypeUtils import moe.nea.firmament.Firmament +import moe.nea.firmament.util.ErrorUtil import moe.nea.firmament.util.MC /** @@ -48,7 +49,7 @@ open class FirmamentEventBus<T : FirmamentEvent> { val klass = e.javaClass if (!function.knownErrors.contains(klass) || Firmament.DEBUG) { function.knownErrors.add(klass) - Firmament.logger.error("Caught exception during processing event $event by $function", e) + ErrorUtil.softError("Caught exception during processing event $event by $function", e) } } } |