aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/io
diff options
context:
space:
mode:
authorRoman / Linnea Gräf <roman.graef@gmail.com>2023-06-19 18:37:26 +0200
committerGitHub <noreply@github.com>2023-06-19 18:37:26 +0200
commit7fd26d14e742c974ec50686c375ccdfd9c968faf (patch)
tree0ceb5fbb46d6619b912f8136f3ff7fb4f8848d25 /src/main/kotlin/io
parentf7168033b41ee84a58adbd005b6ba8898b38cb5a (diff)
downloadNotEnoughUpdates-7fd26d14e742c974ec50686c375ccdfd9c968faf.tar.gz
NotEnoughUpdates-7fd26d14e742c974ec50686c375ccdfd9c968faf.tar.bz2
NotEnoughUpdates-7fd26d14e742c974ec50686c375ccdfd9c968faf.zip
Fix hot potato book being parsed as potato (#722)
Diffstat (limited to 'src/main/kotlin/io')
-rw-r--r--src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.kt12
1 files changed, 8 insertions, 4 deletions
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"}")