aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFGuideGUI.kt42
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFStats.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingItems.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt1
5 files changed, 49 insertions, 13 deletions
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 e44071f3e..1adea7d05 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
@@ -112,9 +112,11 @@ class CaptureFarmingGear {
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
for ((_, item) in event.inventoryItems) {
val split = item.getInternalName_old().split(";")
@@ -139,6 +141,13 @@ class CaptureFarmingGear {
highestRabbitLvl = split.last().toInt()
}
}
+ if (split.first() == "BEE") {
+ if (split.last().toInt() > highestBeeLvl) {
+ farmingItems[FarmingItems.BEE] = item
+ outdatedItems[FarmingItems.BEE] = false
+ highestBeeLvl = split.last().toInt()
+ }
+ }
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFGuideGUI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFGuideGUI.kt
index 032c97547..76b0fda29 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFGuideGUI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFGuideGUI.kt
@@ -129,30 +129,38 @@ open class FFGuideGUI : GuiScreen() {
)
GuiRenderUtils.renderItemAndTip(
- FarmingItems.ELEPHANT.getItem(), guiLeft + 152, guiTop + 130, mouseX, mouseY,
+ FarmingItems.ELEPHANT.getItem(), guiLeft + 142, guiTop + 130, mouseX, mouseY,
if (currentPet == FarmingItems.ELEPHANT) 0xFFB3FFB3.toInt() else 0xFF43464B.toInt()
)
GuiRenderUtils.renderItemAndTip(
- FarmingItems.MOOSHROOM_COW.getItem(), guiLeft + 172, guiTop + 130, mouseX, mouseY,
+ FarmingItems.MOOSHROOM_COW.getItem(), guiLeft + 162, guiTop + 130, mouseX, mouseY,
if (currentPet == FarmingItems.MOOSHROOM_COW) 0xFFB3FFB3.toInt() else 0xFF43464B.toInt()
)
GuiRenderUtils.renderItemAndTip(
- FarmingItems.RABBIT.getItem(), guiLeft + 192, guiTop + 130, mouseX, mouseY,
+ FarmingItems.RABBIT.getItem(), guiLeft + 182, guiTop + 130, mouseX, mouseY,
if (currentPet == FarmingItems.RABBIT) 0xFFB3FFB3.toInt() else 0xFF43464B.toInt()
)
+ GuiRenderUtils.renderItemAndTip(
+ FarmingItems.BEE.getItem(), guiLeft + 202, guiTop + 130, mouseX, mouseY,
+ if (currentPet == FarmingItems.BEE) 0xFFB3FFB3.toInt() else 0xFF43464B.toInt()
+ )
} else {
GuiRenderUtils.renderItemAndTip(
- FarmingItems.ELEPHANT.getItem(), guiLeft + 152, guiTop + 160, mouseX, mouseY,
+ FarmingItems.ELEPHANT.getItem(), guiLeft + 142, guiTop + 160, mouseX, mouseY,
if (currentPet == FarmingItems.ELEPHANT) 0xFFB3FFB3.toInt() else 0xFF43464B.toInt()
)
GuiRenderUtils.renderItemAndTip(
- FarmingItems.MOOSHROOM_COW.getItem(), guiLeft + 172, guiTop + 160, mouseX, mouseY,
+ FarmingItems.MOOSHROOM_COW.getItem(), guiLeft + 162, guiTop + 160, mouseX, mouseY,
if (currentPet == FarmingItems.MOOSHROOM_COW) 0xFFB3FFB3.toInt() else 0xFF43464B.toInt()
)
GuiRenderUtils.renderItemAndTip(
- FarmingItems.RABBIT.getItem(), guiLeft + 192, guiTop + 160, mouseX, mouseY,
+ FarmingItems.RABBIT.getItem(), guiLeft + 182, guiTop + 160, mouseX, mouseY,
if (currentPet == FarmingItems.RABBIT) 0xFFB3FFB3.toInt() else 0xFF43464B.toInt()
)
+ GuiRenderUtils.renderItemAndTip(
+ FarmingItems.BEE.getItem(), guiLeft + 202, guiTop + 160, mouseX, mouseY,
+ if (currentPet == FarmingItems.BEE) 0xFFB3FFB3.toInt() else 0xFF43464B.toInt()
+ )
GuiRenderUtils.renderItemAndTip(
FarmingItems.HELMET.getItem(), guiLeft + 162, guiTop + 80, mouseX, mouseY)
@@ -273,21 +281,26 @@ open class FFGuideGUI : GuiScreen() {
if (selectedPage != FortuneGuidePage.UPGRADES) {
if (currentCrop == null) {
- if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 152, guiTop + 130,
+ if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 142, guiTop + 130,
16, 16) && currentPet != FarmingItems.ELEPHANT) {
SoundUtils.playClickSound()
currentPet = FarmingItems.ELEPHANT
FFStats.getTotalFF()
- } else if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 172, guiTop + 130,
+ } else if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 162, guiTop + 130,
16, 16) && currentPet != FarmingItems.MOOSHROOM_COW) {
SoundUtils.playClickSound()
currentPet = FarmingItems.MOOSHROOM_COW
FFStats.getTotalFF()
- } else if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 192, guiTop + 130,
+ } else if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 182, guiTop + 130,
16, 16) && currentPet != FarmingItems.RABBIT) {
SoundUtils.playClickSound()
currentPet = FarmingItems.RABBIT
FFStats.getTotalFF()
+ } else if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 202, guiTop + 130,
+ 16, 16) && currentPet != FarmingItems.BEE) {
+ SoundUtils.playClickSound()
+ currentPet = FarmingItems.BEE
+ FFStats.getTotalFF()
} else if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 142, guiTop + 5, 16, 16)) {
SoundUtils.playClickSound()
currentArmor = if (currentArmor == 1) 0 else 1
@@ -314,21 +327,26 @@ open class FFGuideGUI : GuiScreen() {
currentEquipment = if (currentEquipment == 4) 0 else 4
}
} else {
- if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 152, guiTop + 160,
+ if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 142, guiTop + 160,
16, 16) && currentPet != FarmingItems.ELEPHANT) {
SoundUtils.playClickSound()
currentPet = FarmingItems.ELEPHANT
FFStats.getTotalFF()
- } else if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 172, guiTop + 160,
+ } else if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 162, guiTop + 160,
16, 16) && currentPet != FarmingItems.MOOSHROOM_COW) {
SoundUtils.playClickSound()
currentPet = FarmingItems.MOOSHROOM_COW
FFStats.getTotalFF()
- } else if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 192, guiTop + 160,
+ } else if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 182, guiTop + 160,
16, 16) && currentPet != FarmingItems.RABBIT) {
SoundUtils.playClickSound()
currentPet = FarmingItems.RABBIT
FFStats.getTotalFF()
+ } else if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 202, guiTop + 160,
+ 16, 16) && currentPet != FarmingItems.BEE) {
+ SoundUtils.playClickSound()
+ currentPet = FarmingItems.BEE
+ FFStats.getTotalFF()
}
}
} else {
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 e5d9c091c..9bcdbe23a 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
@@ -42,6 +42,7 @@ object FFStats {
val elephantFF = mutableMapOf<FFTypes, Double>()
val mooshroomFF = mutableMapOf<FFTypes, Double>()
val rabbitFF = mutableMapOf<FFTypes, Double>()
+ val beeFF = mutableMapOf<FFTypes, Double>()
var currentPetItem = ""
var baseFF = mutableMapOf<FFTypes, Double>()
@@ -78,6 +79,7 @@ object FFStats {
getPetFFData(FarmingItems.ELEPHANT.getItem(), elephantFF)
getPetFFData(FarmingItems.MOOSHROOM_COW.getItem(), mooshroomFF)
getPetFFData(FarmingItems.RABBIT.getItem(), rabbitFF)
+ getPetFFData(FarmingItems.BEE.getItem(), beeFF)
getGenericFF(baseFF)
@@ -222,6 +224,10 @@ object FFStats {
petList = rabbitFF
}
+ FarmingItems.BEE -> {
+ petList = beeFF
+ }
+
else -> {}
}
currentPetItem = FFGuideGUI.currentPet.getItem().getPetItem().toString()
@@ -243,6 +249,8 @@ object FFStats {
(10 + petLevel).toDouble() + strength / (40 - petLevel * .2)
} else if (rawInternalName.contains("MOOSHROOM")) {
(10 + petLevel).toDouble()
+ } else if (rawInternalName.contains("BEE;4")) {
+ 0.3 * petLevel
} else 0.0
}
return 0.0
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingItems.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingItems.kt
index 3cd80db07..4da76872b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingItems.kt
@@ -2,5 +2,5 @@ package at.hannibal2.skyhanni.features.garden.fortuneguide
enum class FarmingItems {
WHEAT, CARROT, POTATO, NETHER_WART, PUMPKIN, MELON, COCOA_BEANS, SUGAR_CANE, CACTUS, MUSHROOM,
- HELMET, CHESTPLATE, LEGGINGS, BOOTS, NECKLACE, CLOAK, BELT, BRACELET, ELEPHANT, MOOSHROOM_COW, RABBIT
+ HELMET, CHESTPLATE, LEGGINGS, BOOTS, NECKLACE, CLOAK, BELT, BRACELET, ELEPHANT, MOOSHROOM_COW, RABBIT, BEE
} \ 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 bd79c3343..57d60420a 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
@@ -141,6 +141,7 @@ class OverviewPage: FFGuideGUI.FFGuidePage() {
val currentPet = when (FFGuideGUI.currentPet) {
FarmingItems.ELEPHANT -> FFStats.elephantFF
FarmingItems.MOOSHROOM_COW -> FFStats.mooshroomFF
+ FarmingItems.BEE -> FFStats.beeFF
else -> FFStats.rabbitFF
}