diff options
author | Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> | 2024-04-08 20:27:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-08 20:27:38 +0200 |
commit | 4aaf4295152d211b1c8853a173cc4cf6a9d000a2 (patch) | |
tree | 9ebd0a44cad5329bdd2452e99395e7cc7ba16f41 /src/main/java/at/hannibal2/skyhanni/features | |
parent | 451a9b5636c113d1da15fc6419ea99f306f66e55 (diff) | |
download | skyhanni-4aaf4295152d211b1c8853a173cc4cf6a9d000a2.tar.gz skyhanni-4aaf4295152d211b1c8853a173cc4cf6a9d000a2.tar.bz2 skyhanni-4aaf4295152d211b1c8853a173cc4cf6a9d000a2.zip |
Fix/Backend: Renderable.itemStack itemScale (#1390)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
7 files changed, 29 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt index 01712fec4..c80573e32 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/BestiaryData.kt @@ -64,7 +64,7 @@ object BestiaryData { if (!isEnabled()) return if (inInventory) { config.position.renderStringsAndItems( - display, extraSpace = -1, itemScale = 1.3, posLabel = "Bestiary Data" + display, extraSpace = -1, itemScale = 0.7, posLabel = "Bestiary Data" ) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt index 497932ae4..e6d78b25e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt @@ -72,7 +72,7 @@ class AnitaMedalProfit { val newList = mutableListOf<Renderable>() newList.add(Renderable.string("§eMedal Profit")) - newList.add(LorenzUtils.fillTable(table, padding = 5, itemScale = 1.7)) + newList.add(LorenzUtils.fillTable(table, padding = 5, itemScale = 0.7)) display = newList } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt index 9fba9db86..8377c5777 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt @@ -494,7 +494,7 @@ object GardenNextJacobContest { if (display.isEmpty()) { config.pos.renderStrings(simpleDisplay, posLabel = "Garden Next Jacob Contest") } else { - config.pos.renderSingleLineWithItems(display, 1.7, posLabel = "Garden Next Jacob Contest") + config.pos.renderSingleLineWithItems(display, 1.0, posLabel = "Garden Next Jacob Contest") } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/SkyMartCopperPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/SkyMartCopperPrice.kt index 29623653b..adedbb150 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/SkyMartCopperPrice.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/SkyMartCopperPrice.kt @@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.itemName import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.NEUInternalName import at.hannibal2.skyhanni.utils.NEUItems.getPrice import at.hannibal2.skyhanni.utils.NEUItems.getPriceOrNull @@ -20,6 +21,7 @@ import at.hannibal2.skyhanni.utils.RenderUtils.renderRenderables import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.renderables.Renderable import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern +import com.google.gson.JsonPrimitive import net.minecraft.item.ItemStack import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -93,7 +95,16 @@ class SkyMartCopperPrice { add("§7Copper amount: §c${copper.addSeparators()} ") add("§7Profit per copper: §6${perFormat} ") } - table.add(DisplayTableEntry("$itemName§f:", "§6§l$perFormat", factor, internalName, hover, highlightsOnHoverSlots = listOf(slot))) + table.add( + DisplayTableEntry( + "$itemName§f:", + "§6§l$perFormat", + factor, + internalName, + hover, + highlightsOnHoverSlots = listOf(slot) + ) + ) } } @@ -126,5 +137,8 @@ class SkyMartCopperPrice { event.move(3, "garden.skyMartCopperPrice", "garden.skyMart.copperPrice") event.move(3, "garden.skyMartCopperPriceAdvancedStats", "garden.skyMart.copperPriceAdvancedStats") event.move(3, "garden.skyMartCopperPricePos", "garden.skyMart.copperPricePos") + event.transform(32, "garden.skyMart.itemScale") { + JsonPrimitive((it.asDouble / 1.851).round(1)) + } } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt index f0b1418ba..80d3c390a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt @@ -52,7 +52,7 @@ class ChestValue { config.position.renderStringsAndItems( display, extraSpace = -1, - itemScale = 1.3, + itemScale = 0.7, posLabel = "Estimated Chest Value" ) } diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt index 54063b835..9d9c98115 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt @@ -38,7 +38,7 @@ object SackDisplay { if (SackAPI.inSackInventory) { if (!isEnabled()) return config.position.renderStringsAndItems( - display, extraSpace = config.extraSpace, itemScale = 1.3, posLabel = "Sacks Items" + display, extraSpace = config.extraSpace, itemScale = 0.7, posLabel = "Sacks Items" ) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt index 88269a643..f5f0ac58a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt @@ -46,7 +46,7 @@ class ShowMotesNpcSellPrice { if (inInventory) { config.inventoryValue.position.renderStringsAndItems( display, - itemScale = 1.3, + itemScale = 0.7, posLabel = "Inventory Motes Value" ) } @@ -146,7 +146,14 @@ class ShowMotesNpcSellPrice { add("") add("§6Total value: §d$price coins") } - add(Renderable.hoverTips("§6${stack.displayName}: §b$price", tips, highlightsOnHoverSlots = index, stack = stack)) + add( + Renderable.hoverTips( + "§6${stack.displayName}: §b$price", + tips, + highlightsOnHoverSlots = index, + stack = stack + ) + ) }) } val total = itemMap.values.fold(0.0) { acc, pair -> acc + pair.second }.formatPrice() |