aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt
diff options
context:
space:
mode:
authorThunderblade73 <85900443+Thunderblade73@users.noreply.github.com>2024-02-20 18:28:44 +0100
committerGitHub <noreply@github.com>2024-02-20 18:28:44 +0100
commit2d1a900fd40150cff686ea4f2c260d120140d653 (patch)
treecba51f2e6456e474cacbdc4cadbc138c3eea445f /src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt
parent5e83fa9cd9d53f6a7f9d702e77a0873db3487b8f (diff)
downloadskyhanni-2d1a900fd40150cff686ea4f2c260d120140d653.tar.gz
skyhanni-2d1a900fd40150cff686ea4f2c260d120140d653.tar.bz2
skyhanni-2d1a900fd40150cff686ea4f2c260d120140d653.zip
Fixed gfs bazaar given wrong search value. #1032
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt
index 942114203..f5b8904a6 100644
--- a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt
@@ -18,7 +18,6 @@ import at.hannibal2.skyhanni.utils.NumberUtil.isInt
import at.hannibal2.skyhanni.utils.PrimitiveItemStack
import at.hannibal2.skyhanni.utils.PrimitiveItemStack.Companion.makePrimitiveStack
import at.hannibal2.skyhanni.utils.SimpleTimeMark
-import at.hannibal2.skyhanni.utils.StringUtils.firstLetterUppercase
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraft.inventory.Slot
@@ -50,9 +49,9 @@ object GetFromSackAPI {
fun getFromChatMessageSackItems(
item: PrimitiveItemStack,
- text: String = "§lCLICK HERE§r§e to grab §ax${item.amount} §9${item.name.asString()}§e from sacks!"
+ text: String = "§lCLICK HERE§r§e to grab §ax${item.amount} §9${item.itemName}§e from sacks!"
) =
- ChatUtils.clickableChat(text, "${commands.first()} ${item.name.asString()} ${item.amount}")
+ ChatUtils.clickableChat(text, "${commands.first()} ${item.internalName.asString()} ${item.amount}")
fun getFromSlotClickedSackItems(items: List<PrimitiveItemStack>, slotIndex: Int) = addToInventory(items, slotIndex)
@@ -79,7 +78,7 @@ object GetFromSackAPI {
if (!LorenzUtils.inSkyBlock) return
if (queue.isNotEmpty() && lastTimeOfCommand.passedSince() >= minimumDelay) {
val item = queue.poll()
- LorenzUtils.sendCommandToServer("gfs ${item.name.asString()} ${item.amount}")
+ LorenzUtils.sendCommandToServer("gfs ${item.internalName.asString()} ${item.amount}")
lastTimeOfCommand = ChatUtils.getTimeWhenNewlyQueuedMessageGetsExecuted()
}
}
@@ -105,7 +104,7 @@ object GetFromSackAPI {
event.toolTip.let { tip ->
tip.add("")
tip.add("§ePress right click to get from sack:")
- tip.addAll(list.map { "§ex" + it.amount.toString() + " " + it.name.asString() })
+ tip.addAll(list.map { "§ex" + it.amount.toString() + " " + it.internalName.asString() })
}
}
@@ -173,12 +172,12 @@ object GetFromSackAPI {
fromSacksChatPattern.matchMatcher(message) {
val diff = stack.amount - group("amount").toInt()
if (diff <= 0) return
- bazaarMessage(stack.name.asString().firstLetterUppercase(), diff, true)
+ bazaarMessage(stack.itemName, diff, true)
lastItemStack = null
return
}
missingChatPattern.matchMatcher(message) {
- bazaarMessage(stack.name.asString().firstLetterUppercase(), stack.amount)
+ bazaarMessage(stack.itemName, stack.amount)
lastItemStack = null
return
}