diff options
author | Linnea Gräf <nea@nea.moe> | 2024-10-13 17:32:10 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-10-13 17:32:10 +0200 |
commit | e6142bb93619dee768fc18b87ffdd28558d4bcab (patch) | |
tree | 03df79712151f7579cd683c8340741ebb3191822 /src/main/kotlin/features/debug | |
parent | daa63bd914a2f6c5e9b668abb8474884685ee818 (diff) | |
download | firmament-e6142bb93619dee768fc18b87ffdd28558d4bcab.tar.gz firmament-e6142bb93619dee768fc18b87ffdd28558d4bcab.tar.bz2 firmament-e6142bb93619dee768fc18b87ffdd28558d4bcab.zip |
Make pickaxe ability display use AbilityUtils
[no changelog]
Diffstat (limited to 'src/main/kotlin/features/debug')
-rw-r--r-- | src/main/kotlin/features/debug/PowerUserTools.kt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/kotlin/features/debug/PowerUserTools.kt b/src/main/kotlin/features/debug/PowerUserTools.kt index 7ce14c0..529f011 100644 --- a/src/main/kotlin/features/debug/PowerUserTools.kt +++ b/src/main/kotlin/features/debug/PowerUserTools.kt @@ -28,6 +28,7 @@ import moe.nea.firmament.mixins.accessor.AccessorHandledScreen import moe.nea.firmament.util.ClipboardUtils import moe.nea.firmament.util.MC import moe.nea.firmament.util.focusedItemStack +import moe.nea.firmament.util.mc.SNbtFormatter.Companion.toPrettyString import moe.nea.firmament.util.mc.displayNameAccordingToNbt import moe.nea.firmament.util.mc.loreAccordingToNbt import moe.nea.firmament.util.skyBlockId @@ -44,6 +45,7 @@ object PowerUserTools : FirmamentFeature { val copyLoreData by keyBindingWithDefaultUnbound("copy-lore") val copySkullTexture by keyBindingWithDefaultUnbound("copy-skull-texture") val copyEntityData by keyBindingWithDefaultUnbound("entity-data") + val copyItemStack by keyBindingWithDefaultUnbound("copy-item-stack") } override val config @@ -125,7 +127,7 @@ object PowerUserTools : FirmamentFeature { Pair(item, Text.stringifiedTranslatable("firmament.tooltip.copied.modelid", model.toString())) } else if (it.matches(TConfig.copyNbtData)) { // TODO: copy full nbt - val nbt = item.get(DataComponentTypes.CUSTOM_DATA)?.nbt?.toString() ?: "<empty>" + val nbt = item.get(DataComponentTypes.CUSTOM_DATA)?.nbt?.toPrettyString() ?: "<empty>" ClipboardUtils.setTextContent(nbt) lastCopiedStack = Pair(item, Text.translatable("firmament.tooltip.copied.nbt")) } else if (it.matches(TConfig.copyLoreData)) { @@ -157,6 +159,9 @@ object PowerUserTools : FirmamentFeature { Text.stringifiedTranslatable("firmament.tooltip.copied.skull-id", skullTexture.toString()) ) println("Copied skull id: $skullTexture") + } else if (it.matches(TConfig.copyItemStack)) { + ClipboardUtils.setTextContent(item.encode(MC.currentOrDefaultRegistries).toPrettyString()) + lastCopiedStack = Pair(item, Text.stringifiedTranslatable("firmament.tooltip.copied.stack")) } } |