aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/debug/PowerUserTools.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/features/debug/PowerUserTools.kt')
-rw-r--r--src/main/kotlin/features/debug/PowerUserTools.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/features/debug/PowerUserTools.kt b/src/main/kotlin/features/debug/PowerUserTools.kt
index 1a14f73..145ea35 100644
--- a/src/main/kotlin/features/debug/PowerUserTools.kt
+++ b/src/main/kotlin/features/debug/PowerUserTools.kt
@@ -13,6 +13,7 @@ import net.minecraft.world.item.Items
import net.minecraft.nbt.ListTag
import net.minecraft.nbt.NbtOps
import net.minecraft.advancements.critereon.NbtPredicate
+import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
import net.minecraft.network.chat.Component
import net.minecraft.network.chat.ComponentSerialization
import net.minecraft.resources.ResourceLocation
@@ -202,7 +203,7 @@ object PowerUserTools {
.orThrow
ClipboardUtils.setTextContent(nbt.toPrettyString())
lastCopiedStack = Pair(item, Component.translatableEscape("firmament.tooltip.copied.stack"))
- } else if (it.matches(TConfig.copyTitle)) {
+ } else if (it.matches(TConfig.copyTitle) && it.screen is AbstractContainerScreen<*>) {
val allTitles = ListTag()
val inventoryNames =
it.screen.menu.slots