aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2023-08-28 20:02:24 +1000
committerGitHub <noreply@github.com>2023-08-28 12:02:24 +0200
commit1fdbbe23800bd6347e6f7e3de9362c7745e2c144 (patch)
tree99f95c30f4ff09b92998591b74c6607b65f5e3ea /src/main
parent7c38caa1966996141e159997e85150a107fdd352 (diff)
downloadskyhanni-1fdbbe23800bd6347e6f7e3de9362c7745e2c144.tar.gz
skyhanni-1fdbbe23800bd6347e6f7e3de9362c7745e2c144.tar.bz2
skyhanni-1fdbbe23800bd6347e6f7e3de9362c7745e2c144.zip
Merge pull request #404
* Various /ff fixes
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt11
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt33
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFStats.kt23
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingReforges.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneStats.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/TODO list66
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt40
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt18
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/GuiRenderUtils.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt7
14 files changed, 96 insertions, 127 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
index 0b4f8c6e9..0768e9f65 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
@@ -170,6 +170,10 @@ object Commands {
"shdebugdata",
"Prints debug data in the clipboard"
) { SkyHanniTestCommand.debugData(it) }
+ registerCommand(
+ "shcarrot",
+ "Toggles receiving the 12 fortune from carrots"
+ ) { CaptureFarmingGear.reverseCarrotFortune() }
}
private fun developersDebugFeatures() {
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java
index cfe2570b9..4ddf71101 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java
@@ -272,7 +272,7 @@ public class InventoryConfig {
"§bPet Level",
"§bMinion Tier",
"§bCrimson Armor",
- "§b§mWishing Compass§r §7(Disabled)",
+ "§7(Removed)",
"§bKuudra Key",
"§bSkill Level",
"§bCollection Level",
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt
index fe4403046..bb91289bc 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt
@@ -205,7 +205,7 @@ class FarmingFortuneDisplay {
fun getSunderFortune(tool: ItemStack?): Double { return (tool?.getEnchantments()?.get("sunder") ?: 0) * 12.5 }
fun getHarvestingFortune(tool: ItemStack?): Double { return (tool?.getEnchantments()?.get("harvesting") ?: 0) * 12.5 }
- fun getCultivatingFortune(tool: ItemStack?): Double { return (tool?.getEnchantments()?.get("cultivating") ?: 0).toDouble()}
+ fun getCultivatingFortune(tool: ItemStack?): Double { return (tool?.getEnchantments()?.get("cultivating") ?: 0) * 2.0}
fun getAbilityFortune(item: ItemStack?): Double {
val lotusAbilityPattern = "§7Piece Bonus: §6+(?<bonus>.*)☘".toPattern()
@@ -254,7 +254,14 @@ class FarmingFortuneDisplay {
val accessoryFortune = accessoryFortune ?: 0.0
val baseFortune = if (alwaysBaseFortune) 100.0 else baseFortune
- return baseFortune + upgradeFortune + tabFortune + toolFortune + accessoryFortune
+ var carrotFortune = 0.0
+ val hidden = GardenAPI.config?.fortune
+ if (currentCrop != null && hidden != null) {
+ if (currentCrop == CropType.CARROT) {
+ if (hidden.carrotFortune) carrotFortune = 12.0
+ }
+ }
+ return baseFortune + upgradeFortune + tabFortune + toolFortune + accessoryFortune + carrotFortune
}
fun CropType.getLatestTrueFarmingFortune() = latestFF?.get(this)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt
index 345ecb09a..dad33a902 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt
@@ -35,15 +35,6 @@ object GardenCropMilestoneDisplay {
private var needsInventory = false
@SubscribeEvent
- fun onChatMessage(event: LorenzChatEvent) {
- if (!isEnabled()) return
- // TODO remove this once hypixel counts 64x pumpkin drops to cultivating
- if (event.message == "§a§lUNCOMMON DROP! §r§eDicer dropped §r§f64x §r§fPumpkin§r§e!") {
- CropType.PUMPKIN.setCounter(CropType.PUMPKIN.getCounter() + 64)
- }
- }
-
- @SubscribeEvent
fun onConfigLoad(event: ConfigLoadEvent) {
LorenzUtils.onToggle(
config.cropMilestoneBestShowMaxedNeeded,
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt
index 1adea7d05..54f0fa6bd 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt
@@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.features.garden.FarmingFortuneDisplay
import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.features.garden.GardenAPI.getCropType
import at.hannibal2.skyhanni.utils.InventoryUtils
+import at.hannibal2.skyhanni.utils.ItemUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -77,6 +78,12 @@ class CaptureFarmingGear {
}
}
}
+
+ fun reverseCarrotFortune() {
+ val hidden = GardenAPI.config?.fortune ?: return
+ hidden.carrotFortune = !hidden.carrotFortune
+ LorenzUtils.chat("§2Toggled exportable carrot fortune to: ${hidden.carrotFortune}")
+ }
}
@SubscribeEvent
@@ -109,14 +116,24 @@ class CaptureFarmingGear {
}
if (event.inventoryName.contains("Pets")) {
// If they've 2 of same pet, one will be overwritten
- farmingItems[FarmingItems.ELEPHANT] = FFGuideGUI.getFallbackItem(FarmingItems.ELEPHANT)
- farmingItems[FarmingItems.MOOSHROOM_COW] = FFGuideGUI.getFallbackItem(FarmingItems.MOOSHROOM_COW)
- farmingItems[FarmingItems.RABBIT] = FFGuideGUI.getFallbackItem(FarmingItems.RABBIT)
- farmingItems[FarmingItems.BEE] = FFGuideGUI.getFallbackItem(FarmingItems.BEE)
- var highestElephantLvl = -1
- var highestMooshroomLvl = -1
- var highestRabbitLvl = -1
- var highestBeeLvl = -1
+ if (farmingItems[FarmingItems.ELEPHANT] == null) {
+ farmingItems[FarmingItems.ELEPHANT] = FFGuideGUI.getFallbackItem(FarmingItems.ELEPHANT)
+ }
+ if (farmingItems[FarmingItems.MOOSHROOM_COW] == null) {
+ farmingItems[FarmingItems.MOOSHROOM_COW] = FFGuideGUI.getFallbackItem(FarmingItems.MOOSHROOM_COW)
+ }
+ if (farmingItems[FarmingItems.RABBIT] == null) {
+ farmingItems[FarmingItems.RABBIT] = FFGuideGUI.getFallbackItem(FarmingItems.RABBIT)
+ }
+ if (farmingItems[FarmingItems.BEE] == null) {
+ farmingItems[FarmingItems.BEE] = FFGuideGUI.getFallbackItem(FarmingItems.BEE)
+ }
+
+ // setting to current saved level -1 to stop later pages saving low rarity pets
+ var highestElephantLvl = ItemUtils.getPetRarityOld(farmingItems[FarmingItems.ELEPHANT])
+ var highestMooshroomLvl = ItemUtils.getPetRarityOld(farmingItems[FarmingItems.MOOSHROOM_COW])
+ var highestRabbitLvl = ItemUtils.getPetRarityOld(farmingItems[FarmingItems.RABBIT])
+ var highestBeeLvl = ItemUtils.getPetRarityOld(farmingItems[FarmingItems.BEE])
for ((_, item) in event.inventoryItems) {
val split = item.getInternalName_old().split(";")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFStats.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFStats.kt
index 9bcdbe23a..d18c91bb8 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFStats.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFStats.kt
@@ -13,6 +13,7 @@ import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getFarmingForDummie
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getPetItem
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getPetLevel
import net.minecraft.item.ItemStack
+import kotlin.math.floor
object FFStats {
private val toolHasBountiful get() = GardenAPI.config?.toolWithBountiful
@@ -88,13 +89,13 @@ object FFStats {
fun getCropStats(crop: CropType, tool: ItemStack) {
cropPage.clear()
- cropPage[FortuneStats.BASE] = Pair(totalBaseFF[FFTypes.TOTAL] ?: 100.0, 1250.0)
+ cropPage[FortuneStats.BASE] = Pair(totalBaseFF[FFTypes.TOTAL] ?: 100.0, 1287.0)
cropPage[FortuneStats.CROP_UPGRADE] = Pair((crop.getUpgradeLevel()?.toDouble() ?: 0.0) * 5.0, 45.0)
cropPage[FortuneStats.ACCESSORY] = Pair(CropAccessoryData.cropAccessory?.getFortune(crop) ?: 0.0, 30.0)
cropPage[FortuneStats.FFD] = Pair((tool.getFarmingForDummiesCount() ?: 0).toDouble(), 5.0)
cropPage[FortuneStats.TURBO] = Pair(FarmingFortuneDisplay.getTurboCropFortune(tool, crop), 25.0)
cropPage[FortuneStats.DEDICATION] = Pair(FarmingFortuneDisplay.getDedicationFortune(tool, crop), 92.0)
- cropPage[FortuneStats.CULTIVATING] = Pair(FarmingFortuneDisplay.getCultivatingFortune(tool), 10.0)
+ cropPage[FortuneStats.CULTIVATING] = Pair(FarmingFortuneDisplay.getCultivatingFortune(tool), 20.0)
FarmingFortuneDisplay.loadFortuneLineData(tool, 0.0)
@@ -151,14 +152,15 @@ object FFStats {
else -> {}
}
+ if (crop == CropType.CARROT) {
+ val hidden = GardenAPI.config?.fortune ?: return
+ val carrotFortune = if (hidden.carrotFortune) 12.0 else 0.0
+ cropPage[FortuneStats.EXPORTED_CARROT] = Pair(carrotFortune, 12.0)
+ }
cropPage[FortuneStats.CROP_TOTAL] = Pair(
cropPage.toList().sumOf { it.second.first },
cropPage.toList().sumOf { it.second.second })
-
- if (tool.getInternalName_old().contains("DICER")) {
- cropPage[FortuneStats.DICER] = Pair(33.0, 33.0)
- }
}
private fun getEquipmentFFData(item: ItemStack, out: MutableMap<FFTypes, Double>) {
@@ -246,12 +248,15 @@ object FFStats {
return if (rawInternalName.contains("ELEPHANT;4")) {
1.5 * petLevel
} else if (rawInternalName.contains("MOOSHROOM_COW;4")) {
- (10 + petLevel).toDouble() + strength / (40 - petLevel * .2)
+ (10 + petLevel).toDouble() + floor(floor(strength / (40 - petLevel * .2)) * .7)
} else if (rawInternalName.contains("MOOSHROOM")) {
(10 + petLevel).toDouble()
- } else if (rawInternalName.contains("BEE;4")) {
+ } else if (rawInternalName.contains("BEE;2")) {
+ 0.2 * petLevel
+ } else if (rawInternalName.contains("BEE;3") || rawInternalName.contains("BEE;4")) {
0.3 * petLevel
- } else 0.0
+ }
+ else 0.0
}
return 0.0
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingReforges.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingReforges.kt
index 672428ba7..d640d9741 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingReforges.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingReforges.kt
@@ -13,7 +13,7 @@ enum class FarmingReforges(
BLESSED("Blessed", "BLESSED_FRUIT", 5, 7, 9, 13, 16, 20),
BOUNTIFUL("Bountiful", "GOLDEN_BALL", 1, 2, 3, 5, 7, 10),
BLOOMING("Blooming", "FLOWERING_BOUQUET", 1, 2, 3, 4, 5, 6),
- ROOTED("Rooted", "BURROWING_SPORES", 4, 6, 8, 10, 12, 14),
+ ROOTED("Rooted", "BURROWING_SPORES", 6, 9, 12, 15, 18, 21),
BUSTLING("Bustling", "SKYMART_BROCHURE", 1, 2, 4, 6, 8, 10),
MOSSY("Mossy", "OVERGROWN_GRASS", 5, 10, 15, 20, 25, 30),
ROBUST("Robust", "", 2, 3, 4, 6, 8, 10),
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneStats.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneStats.kt
index 1e108a2dc..77c275973 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneStats.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneStats.kt
@@ -16,8 +16,8 @@ enum class FortuneStats(val label: String, val tooltip: String) {
COLLECTION("§2Collection Analyst", "§7§2Fortune from increasing crop collection\n§2You get 8☘ per digit - 4"),
HARVESTING("§2Harvesting Enchantment", "§7§2Fortune for each enchantment level\n§2You get 12.5☘ per level"),
SUNDER("§2Sunder Enchantment", "§7§2Fortune for each enchantment level\n§2You get 12.5☘ per level"),
- CULTIVATING("§2Cultivating Enchantment", "§7§2Fortune for each enchantment level\n§2You get 1☘ per level"),
+ CULTIVATING("§2Cultivating Enchantment", "§7§2Fortune for each enchantment level\n§2You get 2☘ per level"),
TURBO("§2Turbo-Crop Enchantment", "§7§2Fortune for each enchantment level\n§2You get 5☘ per level"),
DEDICATION("§2Dedication Enchantment", "§7§2Fortune for each enchantment level\n§2and crop milestone"),
- DICER("§2Dicer Ability", "§7§2Theoretical fortune from the dicer ability\n§eIs very random! and not added to total ☘")
+ EXPORTED_CARROT("§2Exported Carrot", "§7§2Gain 12☘ from exporting Carrots in the Rift!\n§eRun /shcarrot to toggle the stat")
} \ No newline at end of file
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt
index da5a45e24..c4f0848fe 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt
@@ -221,7 +221,7 @@ object FortuneUpgrades {
}
if (cultivatingLvl == 0) {
cropSpecificUpgrades.add(
- FortuneUpgrade("§7Enchant your ${tool.displayName} §7with Cultivating", null, "CULTIVATING;1", 1, 6.0)
+ FortuneUpgrade("§7Enchant your ${tool.displayName} §7with Cultivating", null, "CULTIVATING;1", 1, 12.0)
)
}
if (turboCropLvl != 5) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/TODO list b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/TODO list
deleted file mode 100644
index a34e366d7..000000000
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/TODO list
+++ /dev/null
@@ -1,66 +0,0 @@
-V2 Plans
-
-Guide for cheapest upgrades:
- - Anita buff
- - Garden plots
- - Pet Item
- - Equipment
- - Green thumb
- - Reforges
- - Recombs
- - Armor
- - Reforges
- - Recombs
- - Talisman
- - Tools
- - Farming for dummies
- - Harvesting 6
- - Reforge
- - Recomb
- - Sunder
- - Dedication
- - Crop upgrade
- - Turbo crop
-
-Big warning for missing data (pets, armor, equipment) (if it has to generate a fallback item)
-Big warnign for misisng skill level, anita, plots
-Indicator when some of your gear is outdated
- - Little sign telling you
- - Line in the tooltip of the item
-
-Changing lore on items inside the menu to reflect changes
- - Changing the amount of visitors served to reflect the real amount
- - Changing the pet level to reflect the pets actual level
-
-Max value on bars will update depending on chosen pet
- - Will be visible on all pages
-
-If you have show as drop multiplier off -100ff
-When opening the menu it will open to the tool you are currently holding
-It will also auto select the current pet you have out if that is a farming pet
-
-Add colours to the text
-
-Maybe:
-Clicking on the already selected crop up top will cycle between overview and upgrades
-
-Later on:
-GUI:
-Add a border around the edge of the display
-Make this adjust based on the selected page
-
-!!!!
-Bugs:
-Major:
-Sometimes the greenthumb visitor counter breaks?
-Sometimes the ff breakdown for equipment and armor does not work in the gui?
- - fixes by holding shift over an item in the inventory then going back into the gui
-If they sell their equipment or pets, they will be saved until a new one is bought and their stats counted : fix, don't liquidize your stuff lol
-- can fix pets, equipment is more difficult
-Minor:
-Taking off or putting equipment on inside the menu won't update it until you reopen the inventory
- - also if they sell the piece of equipment, it will always think they still have it
-!!!!
-
-Add:
-Daedalus axe for mushroom \ No newline at end of file
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt
index 57d60420a..0c1fe0968 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt
@@ -17,15 +17,10 @@ class OverviewPage: FFGuideGUI.FFGuidePage() {
override fun drawPage(mouseX: Int, mouseY: Int, partialTicks: Float) {
val timeUntilCakes = TimeUtils.formatDuration(FFStats.cakeExpireTime - System.currentTimeMillis())
- //todo change based on pet and based on setting
- GuiRenderUtils.drawFarmingBar(
- "§6Universal Farming Fortune",
+ GuiRenderUtils.drawFarmingBar("§6Universal Farming Fortune",
"§7§2Farming fortune in that is\n§2applied to every crop\n§eNot the same as tab FF\n" +
- "§eSee on the grass block page",
- FFStats.totalBaseFF[FFTypes.TOTAL] ?: 0,
- 1250,
- FFGuideGUI.guiLeft + 15,
- FFGuideGUI.guiTop + 5, 90, mouseX, mouseY, FFGuideGUI.tooltipToDisplay)
+ "§eSee on the grass block page", FFStats.totalBaseFF[FFTypes.TOTAL] ?: 0, 1267,
+ FFGuideGUI.guiLeft + 15, FFGuideGUI.guiTop + 5, 90, mouseX, mouseY, FFGuideGUI.tooltipToDisplay)
var line = if (FFStats.baseFF[FFTypes.ANITA]!! < 0.0) "§cAnita buff not saved\n§eVisit Anita to set it!"
else "§7§2Fortune for levelling your Anita extra crops\n§2You get 4☘ per buff level"
@@ -114,7 +109,7 @@ class OverviewPage: FFGuideGUI.FFGuidePage() {
when (currentArmor) {
0 -> 50
4 -> 0
- else -> 16.67
+ else -> 16.667
}
} else {
when (currentArmor) {
@@ -138,15 +133,26 @@ class OverviewPage: FFGuideGUI.FFGuidePage() {
value, FFGuideGUI.guiLeft + 135,
FFGuideGUI.guiTop + 105, 90, mouseX, mouseY, FFGuideGUI.tooltipToDisplay)
- val currentPet = when (FFGuideGUI.currentPet) {
- FarmingItems.ELEPHANT -> FFStats.elephantFF
- FarmingItems.MOOSHROOM_COW -> FFStats.mooshroomFF
- FarmingItems.BEE -> FFStats.beeFF
- else -> FFStats.rabbitFF
+ var currentPet = FFStats.rabbitFF
+ var petMaxFF = 60
+ when (FFGuideGUI.currentPet) {
+ FarmingItems.ELEPHANT -> {
+ currentPet = FFStats.elephantFF
+ petMaxFF = 210
+ }
+ FarmingItems.MOOSHROOM_COW -> {
+ currentPet = FFStats.mooshroomFF
+ petMaxFF = 217
+ }
+ FarmingItems.BEE -> {
+ currentPet = FFStats.beeFF
+ petMaxFF = 90
+ }
+ else -> {}
}
GuiRenderUtils.drawFarmingBar("§2Total Pet Fortune", "§7§2The total fortune from your pet and its item",
- currentPet[FFTypes.TOTAL] ?: 0, 240, FFGuideGUI.guiLeft + 105,
+ currentPet[FFTypes.TOTAL] ?: 0, petMaxFF, FFGuideGUI.guiLeft + 105,
FFGuideGUI.guiTop + 155, 70, mouseX, mouseY, FFGuideGUI.tooltipToDisplay)
line = when (FFStats.currentPetItem) {
@@ -178,7 +184,7 @@ class OverviewPage: FFGuideGUI.FFGuidePage() {
line = if (currentEquipment == 0) "§7§2Total fortune from all your equipment\n§2Select a piece for more info"
else "§7§2Total fortune from your\n${equipmentItem.getItem().displayName}"
GuiRenderUtils.drawFarmingBar("§2Total $word Fortune", line, equipmentFF[FFTypes.TOTAL] ?: 0,
- if (currentEquipment == 0) 198 else 49.5,
+ if (currentEquipment == 0) 218 else 54.5,
FFGuideGUI.guiLeft + 255, FFGuideGUI.guiTop + 30, 90, mouseX, mouseY, FFGuideGUI.tooltipToDisplay)
line = if (currentEquipment == 0) "§7§2The base fortune from all your equipment\n§2Select a piece for more info"
@@ -196,7 +202,7 @@ class OverviewPage: FFGuideGUI.FFGuidePage() {
line = if (currentEquipment == 0) "§7§2The fortune from all of your equipment's reforges\n§2Select a piece for more info"
else "§7§2Total reforge fortune from your\n${equipmentItem.getItem().displayName}"
GuiRenderUtils.drawFarmingBar("§2$word Reforge", line, equipmentFF[FFTypes.REFORGE] ?: 0,
- if (currentEquipment == 0) 40 else 10,
+ if (currentEquipment == 0) 60 else 15,
FFGuideGUI.guiLeft + 255, FFGuideGUI.guiTop + 105, 90, mouseX, mouseY, FFGuideGUI.tooltipToDisplay)
line = if (currentEquipment == 0) "§7§2The fortune from all of your equipment's enchantments\n§2Select a piece for more info"
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
index aa73ad5bc..bcd6783be 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
@@ -19,9 +19,7 @@ import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class ItemDisplayOverlayFeatures {
-
- private val wishingCompassPattern = "§7Remaining Uses: §e(?<amount>.*)§8/§e3".toPattern()
- private val rangerBootsSpeedCapPattern = "§7Current Speed Cap: §a(?<cap>.*)".toPattern()
+ private val rancherBootsSpeedCapPattern = "§7Current Speed Cap: §a(?<cap>.*)".toPattern()
private val petLevelPattern = "\\[Lvl (?<level>.*)] .*".toPattern()
@SubscribeEvent
@@ -99,7 +97,7 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(7)) {
+ if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(8)) {
if (itemName.contains("Kuudra Key")) {
return when (itemName) {
"Kuudra Key" -> "§a1"
@@ -112,7 +110,7 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(8)) {
+ if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(9)) {
if (InventoryUtils.openInventoryName() == "Your Skills") {
if (item.getLore().any { it.contains("Click to view!") }) {
if (CollectionAPI.isCollectionTier0(item.getLore())) return "0"
@@ -124,7 +122,7 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(9)) {
+ if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(10)) {
if (InventoryUtils.openInventoryName().endsWith(" Collections")) {
val lore = item.getLore()
if (lore.any { it.contains("Click to view!") }) {
@@ -139,17 +137,17 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(10)) {
+ if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(11)) {
if (itemName.contains("Rancher's Boots")) {
for (line in item.getLore()) {
- rangerBootsSpeedCapPattern.matchMatcher(line) {
+ rancherBootsSpeedCapPattern.matchMatcher(line) {
return group("cap")
}
}
}
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(11)) {
+ if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(12)) {
if (item.getInternalName_old() == "LARVA_HOOK") {
for (line in item.getLore()) {
"§7§7You may harvest §6(?<amount>.).*".toPattern().matchMatcher(line) {
@@ -164,7 +162,7 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(12)) {
+ if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(13)) {
if (item.getInternalName_old() == "POTION") {
item.name?.let {
"Dungeon (?<level>.*) Potion".toPattern().matchMatcher(it.removeColor()) {
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/GuiRenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/GuiRenderUtils.kt
index 9c9d612f3..a8d493018 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/GuiRenderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/GuiRenderUtils.kt
@@ -236,7 +236,7 @@ object GuiRenderUtils {
GlStateManager.scale(textScale, textScale, 1f)
drawString(label, xPos * inverseScale, yPos * inverseScale)
drawString(
- "§2$current / ${DecimalFormat("0.#").format(maxValue)}☘",
+ "§2$current / ${DecimalFormat("0.##").format(maxValue)}☘",
xPos * inverseScale,
(yPos + 8) * inverseScale
)
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
index d90c16ded..510ef0aa3 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
@@ -233,4 +233,11 @@ object ItemUtils {
}
return getItemStack().nameWithEnchantment ?: error("Could not find item name for $this")
}
+
+ fun getPetRarityOld(petStack: ItemStack?): Int {
+ val petInternalName = petStack?.getInternalName_old()
+ if (petInternalName == "NONE" || petInternalName == null) return -1
+ val split = petInternalName.split(";")
+ return split.last().toInt()
+ }
} \ No newline at end of file