aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorDavid Cole <40234707+DavidArthurCole@users.noreply.github.com>2024-06-30 06:49:41 -0400
committerGitHub <noreply@github.com>2024-06-30 12:49:41 +0200
commit48f26364f0572793f38f32a94697e1154447fcfc (patch)
treecd09363a403b6df2bb65dffee195cf8820987e84 /src/main
parentd16f39c67a239173d293b473ca37c179fc628df4 (diff)
downloadskyhanni-48f26364f0572793f38f32a94697e1154447fcfc.tar.gz
skyhanni-48f26364f0572793f38f32a94697e1154447fcfc.tar.bz2
skyhanni-48f26364f0572793f38f32a94697e1154447fcfc.zip
Feature: Add Recipe Link to Shopping List Craftable! text (#2075)
Co-authored-by: Luna <luna@alexia.lol>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
index 4d7c45cd0..2df429c7b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
@@ -30,6 +30,7 @@ import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList
import at.hannibal2.skyhanni.utils.ConfigUtils
import at.hannibal2.skyhanni.utils.EntityUtils
+import at.hannibal2.skyhanni.utils.HypixelCommands
import at.hannibal2.skyhanni.utils.InventoryUtils.getAmountInInventory
import at.hannibal2.skyhanni.utils.ItemBlink
import at.hannibal2.skyhanni.utils.ItemUtils
@@ -253,7 +254,21 @@ object GardenVisitorFeatures {
}
}
if (hasIngredients) {
- list.add(" §7(§aCraftable!§7)")
+ val leftToCraft = amount - amountInSacks
+ list.add(" §7(")
+ list.add(
+ Renderable.optionalLink(
+ "§aCraftable!",
+ {
+ if (Minecraft.getMinecraft().currentScreen is GuiEditSign) {
+ LorenzUtils.setTextIntoSign("$leftToCraft")
+ } else {
+ HypixelCommands.viewRecipe(internalName.toString())
+ }
+ },
+ ) { GardenAPI.inGarden() && !NEUItems.neuHasFocus() },
+ )
+ list.add("§7)")
}
}