aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
authorAd_amko <83232017+Okmada@users.noreply.github.com>2023-04-07 02:53:31 +0200
committerGitHub <noreply@github.com>2023-04-07 10:53:31 +1000
commit06bee6784eaf8748e3547f1fafeebe71010566ff (patch)
treef6e1c6668fd439d719e49fb08740a0fb699eb8b5 /src/main/java/io
parent86b772dc5825010b504826ee10bd1ba675c21227 (diff)
downloadNotEnoughUpdates-06bee6784eaf8748e3547f1fafeebe71010566ff.tar.gz
NotEnoughUpdates-06bee6784eaf8748e3547f1fafeebe71010566ff.tar.bz2
NotEnoughUpdates-06bee6784eaf8748e3547f1fafeebe71010566ff.zip
Farming overlay: Nether warts swap from alchemy xp to farming xp (#679)
Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
Diffstat (limited to 'src/main/java/io')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingSkillOverlay.java29
1 files changed, 9 insertions, 20 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingSkillOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingSkillOverlay.java
index 49b653f2..2a6f284c 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingSkillOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingSkillOverlay.java
@@ -48,7 +48,6 @@ public class FarmingSkillOverlay extends TextOverlay {
private int cultivating = -1;
private int cultivatingTier = -1;
private String cultivatingTierAmount = "1";
- private int alchemy = 0;
private int foraging = 0;
private double coins = -1;
private float cropsPerSecondLast = 0;
@@ -204,24 +203,19 @@ public class FarmingSkillOverlay extends TextOverlay {
//Set default skillType to Farming and get BZ price config value
skillType = "Farming";
- alchemy = 0;
foraging = 0;
- //WARTS
+ //WOOD
boolean useBZPrice = NotEnoughUpdates.INSTANCE.config.skillOverlays.useBZPrice;
- if (internalName.startsWith("THEORETICAL_HOE_WARTS")) {
- skillType = "Alchemy";
- alchemy = 1;
- foraging = 0;
- coins = useBZPrice ? getCoinsBz("ENCHANTED_NETHER_STALK", ENCH_SIZE) : 2;
-
- //WOOD
- } else if (internalName.equals("TREECAPITATOR_AXE") || internalName.equalsIgnoreCase("JUNGLE_AXE")) {
+ if (internalName.equals("TREECAPITATOR_AXE") || internalName.equalsIgnoreCase("JUNGLE_AXE")) {
skillType = "Foraging";
- alchemy = 0;
foraging = 1;
coins = 2;
+ //WARTS
+ } else if (internalName.startsWith("THEORETICAL_HOE_WARTS")) {
+ coins = useBZPrice ? getCoinsBz("ENCHANTED_NETHER_STALK", ENCH_SIZE) : 2;
+
//COCOA
} else if (internalName.equals("COCO_CHOPPER")) {
coins = useBZPrice ? getCoinsBz("ENCHANTED_COCOA", ENCH_SIZE) : 3;
@@ -549,29 +543,24 @@ public class FarmingSkillOverlay extends TextOverlay {
}
- if (skillInfo != null && skillInfo.level == 60 || alchemy == 1 && skillInfo != null && skillInfo.level == 50) {
+ if (skillInfo != null && skillInfo.level == 60) {
int current = (int) skillInfo.currentXp;
if (skillInfoLast != null && skillInfo.currentXpMax == skillInfoLast.currentXpMax) {
current = (int) interp(current, skillInfoLast.currentXp);
}
- if (alchemy == 0) {
+ if (foraging == 0) {
lineMap.put(
2,
EnumChatFormatting.AQUA + "Farming: " + EnumChatFormatting.YELLOW + "60 " + EnumChatFormatting.RED +
"(Maxed)"
);
- } else if (foraging == 1) {
+ } else {
lineMap.put(
2,
EnumChatFormatting.AQUA + "Foraging: " + EnumChatFormatting.YELLOW + "50 " + EnumChatFormatting.RED +
"(Maxed)"
);
- } else {
- lineMap.put(
- 2,
- EnumChatFormatting.AQUA + "Alch: " + EnumChatFormatting.YELLOW + "50 " + EnumChatFormatting.RED + "(Maxed)"
- );
}
lineMap.put(3, EnumChatFormatting.AQUA + "Current XP: " + EnumChatFormatting.YELLOW + format.format(current));