diff options
author | Linnea Gräf <nea@nea.moe> | 2024-02-09 12:00:50 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-02-09 12:00:50 +0100 |
commit | efbef712130048e1bf39e66b15271bf663586eee (patch) | |
tree | 5260c953cdb3825128d43323a7de6557561cb7af /src/main/kotlin/moe/nea/firmament/features/debug | |
parent | 0cb6e308acc313a22f9fd796cc47301272485120 (diff) | |
download | firmament-efbef712130048e1bf39e66b15271bf663586eee.tar.gz firmament-efbef712130048e1bf39e66b15271bf663586eee.tar.bz2 firmament-efbef712130048e1bf39e66b15271bf663586eee.zip |
Fix crash when rendering SkyBlock id in a string
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/features/debug')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/features/debug/DeveloperFeatures.kt | 2 | ||||
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/features/debug/PowerUserTools.kt | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/features/debug/DeveloperFeatures.kt b/src/main/kotlin/moe/nea/firmament/features/debug/DeveloperFeatures.kt index 6bf299f..6bbbdf0 100644 --- a/src/main/kotlin/moe/nea/firmament/features/debug/DeveloperFeatures.kt +++ b/src/main/kotlin/moe/nea/firmament/features/debug/DeveloperFeatures.kt @@ -47,7 +47,7 @@ object DeveloperFeatures : FirmamentFeature { MC.player?.sendMessage(Text.translatable("firmament.dev.resourcerebuild.start")) val startTime = TimeMark.now() process.toHandle().onExit().thenApply { - MC.player?.sendMessage(Text.translatable("firmament.dev.resourcerebuild.done", startTime.passedTime())) + MC.player?.sendMessage(Text.stringifiedTranslatable("firmament.dev.resourcerebuild.done", startTime.passedTime())) Unit } } else { diff --git a/src/main/kotlin/moe/nea/firmament/features/debug/PowerUserTools.kt b/src/main/kotlin/moe/nea/firmament/features/debug/PowerUserTools.kt index 4140490..3545f21 100644 --- a/src/main/kotlin/moe/nea/firmament/features/debug/PowerUserTools.kt +++ b/src/main/kotlin/moe/nea/firmament/features/debug/PowerUserTools.kt @@ -54,7 +54,7 @@ object PowerUserTools : FirmamentFeature { ItemTooltipEvent.subscribe { if (TConfig.showItemIds) { val id = it.stack.skyBlockId ?: return@subscribe - it.lines.add(Text.translatable("firmament.tooltip.skyblockid", id.neuItem)) + it.lines.add(Text.stringifiedTranslatable("firmament.tooltip.skyblockid", id.neuItem)) } val (item, text) = lastCopiedStack ?: return@subscribe if (!ItemStack.areEqual(item, it.stack)) { @@ -83,7 +83,7 @@ object PowerUserTools : FirmamentFeature { MC.sendChat(Text.translatable("firmament.tooltip.copied.skull.fail")) } else { ClipboardUtils.setTextContent(id.toString()) - MC.sendChat(Text.translatable("firmament.tooltip.copied.skull", id.toString())) + MC.sendChat(Text.stringifiedTranslatable("firmament.tooltip.copied.skull", id.toString())) } } } @@ -105,7 +105,7 @@ object PowerUserTools : FirmamentFeature { return@subscribe } ClipboardUtils.setTextContent(sbId.neuItem) - lastCopiedStack = Pair(item, Text.translatable("firmament.tooltip.copied.skyblockid", sbId.neuItem)) + lastCopiedStack = Pair(item, Text.stringifiedTranslatable("firmament.tooltip.copied.skyblockid", sbId.neuItem)) } else if (it.matches(TConfig.copyTexturePackId)) { val model = CustomItemModelEvent.getModelIdentifier(item) if (model == null) { @@ -113,7 +113,7 @@ object PowerUserTools : FirmamentFeature { return@subscribe } ClipboardUtils.setTextContent(model.toString()) - lastCopiedStack = Pair(item, Text.translatable("firmament.tooltip.copied.modelid", model.toString())) + lastCopiedStack = Pair(item, Text.stringifiedTranslatable("firmament.tooltip.copied.modelid", model.toString())) } else if (it.matches(TConfig.copyNbtData)) { val nbt = item.orCreateNbt.toString() ClipboardUtils.setTextContent(nbt) |