aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-02 12:29:00 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-02 12:29:00 +0200
commit95339511e6397004b8da6e6a9425ce3a5be6b834 (patch)
tree5a395baae1ca5f9a73b44983bde90d411d9138ab /src/main/java/at/hannibal2
parent90adce2ec4e756c768808241e385afb90245dbdc (diff)
downloadskyhanni-95339511e6397004b8da6e6a9425ce3a5be6b834.tar.gz
skyhanni-95339511e6397004b8da6e6a9425ce3a5be6b834.tar.bz2
skyhanni-95339511e6397004b8da6e6a9425ce3a5be6b834.zip
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFGuideGUI.kt83
1 files changed, 55 insertions, 28 deletions
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 8fbb09a62..11465df66 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
@@ -28,6 +28,7 @@ open class FFGuideGUI : GuiScreen() {
var selectedPage = FortuneGuidePage.OVERVIEW
var currentCrop: CropType? = null
+
//todo set this to what they have equip
var currentPet = FarmingItems.ELEPHANT
var currentArmor = 0
@@ -163,22 +164,30 @@ open class FFGuideGUI : GuiScreen() {
)
GuiRenderUtils.renderItemAndTip(
- FarmingItems.HELMET.getItem(), guiLeft + 162, guiTop + 80, mouseX, mouseY)
+ FarmingItems.HELMET.getItem(), guiLeft + 162, guiTop + 80, mouseX, mouseY
+ )
GuiRenderUtils.renderItemAndTip(
- FarmingItems.CHESTPLATE.getItem(), guiLeft + 162, guiTop + 100, mouseX, mouseY)
+ FarmingItems.CHESTPLATE.getItem(), guiLeft + 162, guiTop + 100, mouseX, mouseY
+ )
GuiRenderUtils.renderItemAndTip(
- FarmingItems.LEGGINGS.getItem(), guiLeft + 162, guiTop + 120, mouseX, mouseY)
+ FarmingItems.LEGGINGS.getItem(), guiLeft + 162, guiTop + 120, mouseX, mouseY
+ )
GuiRenderUtils.renderItemAndTip(
- FarmingItems.BOOTS.getItem(), guiLeft + 162, guiTop + 140, mouseX, mouseY)
+ FarmingItems.BOOTS.getItem(), guiLeft + 162, guiTop + 140, mouseX, mouseY
+ )
GuiRenderUtils.renderItemAndTip(
- FarmingItems.NECKLACE.getItem(), guiLeft + 182, guiTop + 80, mouseX, mouseY)
+ FarmingItems.NECKLACE.getItem(), guiLeft + 182, guiTop + 80, mouseX, mouseY
+ )
GuiRenderUtils.renderItemAndTip(
- FarmingItems.CLOAK.getItem(), guiLeft + 182, guiTop + 100, mouseX, mouseY)
+ FarmingItems.CLOAK.getItem(), guiLeft + 182, guiTop + 100, mouseX, mouseY
+ )
GuiRenderUtils.renderItemAndTip(
- FarmingItems.BELT.getItem(), guiLeft + 182, guiTop + 120, mouseX, mouseY)
+ FarmingItems.BELT.getItem(), guiLeft + 182, guiTop + 120, mouseX, mouseY
+ )
GuiRenderUtils.renderItemAndTip(
- FarmingItems.BRACELET.getItem(), guiLeft + 182, guiTop + 140, mouseX, mouseY)
+ FarmingItems.BRACELET.getItem(), guiLeft + 182, guiTop + 140, mouseX, mouseY
+ )
}
}
pages[selectedPage]?.drawPage(mouseX, mouseY, partialTicks)
@@ -281,23 +290,27 @@ open class FFGuideGUI : GuiScreen() {
if (selectedPage != FortuneGuidePage.UPGRADES) {
if (currentCrop == null) {
- if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 142, guiTop + 130,
- 16, 16) && currentPet != FarmingItems.ELEPHANT) {
+ 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 + 162, guiTop + 130,
- 16, 16) && currentPet != FarmingItems.MOOSHROOM_COW) {
+ } 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 + 182, guiTop + 130,
- 16, 16) && currentPet != FarmingItems.RABBIT) {
+ } 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) {
+ } else if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 202, guiTop + 130, 16, 16) &&
+ currentPet != FarmingItems.BEE
+ ) {
SoundUtils.playClickSound()
currentPet = FarmingItems.BEE
FFStats.getTotalFF()
@@ -327,23 +340,27 @@ open class FFGuideGUI : GuiScreen() {
currentEquipment = if (currentEquipment == 4) 0 else 4
}
} else {
- if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 142, guiTop + 160,
- 16, 16) && currentPet != FarmingItems.ELEPHANT) {
+ 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 + 162, guiTop + 160,
- 16, 16) && currentPet != FarmingItems.MOOSHROOM_COW) {
+ } 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 + 182, guiTop + 160,
- 16, 16) && currentPet != FarmingItems.RABBIT) {
+ } 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) {
+ } else if (GuiRenderUtils.isPointInRect(mouseX, mouseY, guiLeft + 202, guiTop + 160, 16, 16) &&
+ currentPet != FarmingItems.BEE
+ ) {
SoundUtils.playClickSound()
currentPet = FarmingItems.BEE
FFStats.getTotalFF()
@@ -359,7 +376,9 @@ open class FFGuideGUI : GuiScreen() {
private fun renderTabs() {
var x = guiLeft + 15
var y = guiTop - 28
- drawRect(x, y, x + 25, y + 28, if (currentCrop == null) 0x50000000 else 0x50303030)
+ val selectedColor = 0x50000000
+ val notSelectedColor = 0x50303030
+ drawRect(x, y, x + 25, y + 28, if (currentCrop == null) selectedColor else notSelectedColor)
GuiRenderUtils.renderItemStack(ItemStack(Blocks.grass), x + 5, y + 5)
if (GuiRenderUtils.isPointInRect(mouseX, mouseY, x, y, 25, 28)) {
tooltipToDisplay.add("§eOverview")
@@ -367,7 +386,7 @@ open class FFGuideGUI : GuiScreen() {
for (crop in CropType.entries) {
x += 30
- drawRect(x, y, x + 25, y + 28, if (currentCrop == crop) 0x50000000 else 0x50303030)
+ drawRect(x, y, x + 25, y + 28, if (currentCrop == crop) selectedColor else notSelectedColor)
GuiRenderUtils.renderItemStack(crop.icon, x + 5, y + 5)
if (GuiRenderUtils.isPointInRect(mouseX, mouseY, x, y, 25, 28)) {
tooltipToDisplay.add("§e${crop.cropName}")
@@ -377,13 +396,21 @@ open class FFGuideGUI : GuiScreen() {
x = guiLeft - 28
y = guiTop + 15
- drawRect(x, y, x + 28, y + 25, if (selectedPage != FortuneGuidePage.UPGRADES) 0x50000000 else 0x50303030)
+ drawRect(
+ x, y,
+ x + 28, y + 25,
+ if (selectedPage != FortuneGuidePage.UPGRADES) selectedColor else notSelectedColor
+ )
GuiRenderUtils.renderItemStack(ItemStack(Items.gold_ingot), x + 5, y + 5)
if (GuiRenderUtils.isPointInRect(mouseX, mouseY, x, y, 28, 25)) {
tooltipToDisplay.add("§eBreakdown")
}
y += 30
- drawRect(x, y, x + 28, y + 25, if (selectedPage == FortuneGuidePage.UPGRADES) 0x50000000 else 0x50303030)
+ drawRect(
+ x, y,
+ x + 28, y + 25,
+ if (selectedPage == FortuneGuidePage.UPGRADES) selectedColor else notSelectedColor
+ )
GuiRenderUtils.renderItemStack(ItemStack(Items.map), x + 5, y + 5)
if (GuiRenderUtils.isPointInRect(mouseX, mouseY, x, y, 28, 25)) {
tooltipToDisplay.add("§eUpgrades")