From 7fd26d14e742c974ec50686c375ccdfd9c968faf Mon Sep 17 00:00:00 2001 From: Roman / Linnea Gräf Date: Mon, 19 Jun 2023 18:37:26 +0200 Subject: Fix hot potato book being parsed as potato (#722) --- .../notenoughupdates/commands/dev/DevTestCommand.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/main/kotlin') diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.kt index 58da635e..3292a9cf 100644 --- a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.kt +++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.kt @@ -31,10 +31,7 @@ import io.github.moulberry.notenoughupdates.miscfeatures.customblockzones.Custom import io.github.moulberry.notenoughupdates.miscfeatures.customblockzones.LocationChangeEvent import io.github.moulberry.notenoughupdates.miscgui.minionhelper.MinionHelperManager import io.github.moulberry.notenoughupdates.miscgui.pricegraph.GuiPriceGraph -import io.github.moulberry.notenoughupdates.util.ApiCache -import io.github.moulberry.notenoughupdates.util.PronounDB -import io.github.moulberry.notenoughupdates.util.SBInfo -import io.github.moulberry.notenoughupdates.util.TabListUtils +import io.github.moulberry.notenoughupdates.util.* import io.github.moulberry.notenoughupdates.util.brigadier.* import net.minecraft.client.Minecraft import net.minecraft.client.gui.GuiScreen @@ -109,6 +106,13 @@ class DevTestCommand { requires { canPlayerExecute(it) } + thenLiteral("testsearch") { + thenArgument("name", RestArgumentType) { arg -> + thenExecute { + reply("Resolved ID: ${ItemResolutionQuery.findInternalNameByDisplayName(get(arg), true)}") + } + }.withHelp("Search for an item id by name") + } thenLiteralExecute("garden") { val player = Minecraft.getMinecraft().thePlayer reply("Is in Garden: ${SBInfo.getInstance().getLocation() == "garden"}") -- cgit