aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java21
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java121
2 files changed, 127 insertions, 15 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java
index 797083b5..74400f59 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java
@@ -233,12 +233,31 @@ public class Mining {
@ConfigOption(
name = "Star Cult Tab",
desc = "Only show the star cult timer when tab list is open\n" +
- "\u00A7cThis only works outside of Dwarven Caves!"
+ "§cThis only works outside of Dwarven Caves!"
)
@ConfigEditorBoolean
@ConfigAccordionId(id = 2)
public boolean starCultDisplayOnlyShowTab = false;
+ @Expose
+ @ConfigOption(
+ name = "Commission Task Tips",
+ desc = "Show tips to help complete commission tasks"
+ )
+ @ConfigEditorDropdown(
+ values = {"Off", "Only while sneaking", "Always"}
+ )
+ @ConfigAccordionId(id = 2)
+ public int commissionTaskTips = 0;
+
+ @Expose
+ @ConfigOption(
+ name = "Tips in New Line",
+ desc = "Show the Commission Task Tips in the next line.")
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 2)
+ public boolean commissionTaskTipNewLine = true;
+
@ConfigOption(
name = "Metal Detector Solver",
desc = ""
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java
index f25407b6..ea253e94 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java
@@ -31,7 +31,6 @@ import io.github.moulberry.notenoughupdates.util.StarCultCalculator;
import io.github.moulberry.notenoughupdates.util.TabListUtils;
import io.github.moulberry.notenoughupdates.util.Utils;
import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.GuiChat;
import net.minecraft.client.gui.inventory.GuiChest;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.init.Items;
@@ -39,10 +38,6 @@ import net.minecraft.inventory.ContainerChest;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.WorldSettings;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
-import org.lwjgl.input.Keyboard;
import org.lwjgl.util.vector.Vector2f;
import java.util.ArrayList;
@@ -379,22 +374,35 @@ public class MiningOverlay extends TextTabOverlay {
} else if (entry.getValue() >= 0.25) {
col = GOLD;
}
+ String tips = getTipPart(entry.getKey());
+ boolean newLine = NotEnoughUpdates.INSTANCE.config.mining.commissionTaskTipNewLine;
+ String newLineTip = null;
+ if (newLine) {
+ if (!tips.isEmpty()) {
+ newLineTip = " " + tips;
+ tips = "";
+ }
+ }
NEUConfig.HiddenLocationSpecific locationSpecific = NotEnoughUpdates.INSTANCE.config.getLocationSpecific();
int max;
if (-1 != (max = locationSpecific.commissionMaxes.getOrDefault(entry.getKey(), -1))) {
commissionsStrings.add(
- DARK_AQUA + entry.getKey() + ": " + col + Math.round(entry.getValue() * max) + "/" + max);
+ DARK_AQUA + entry.getKey() + ": " + col + Math.round(entry.getValue() * max) + "/" + max + tips);
} else {
String valS = Utils.floatToString(entry.getValue() * 100, 1);
- commissionsStrings.add(DARK_AQUA + entry.getKey() + ": " + col + valS + "%");
+ commissionsStrings.add(DARK_AQUA + entry.getKey() + ": " + col + valS + "%" + tips);
+ }
+ if (newLineTip != null) {
+ commissionsStrings.add(newLineTip);
}
}
}
if (ItemCooldowns.firstLoadMillis > 0) {
//set cooldown on first skyblock load.
- ItemCooldowns.pickaxeUseCooldownMillisRemaining = 60 * 1000 - (System.currentTimeMillis() - ItemCooldowns.firstLoadMillis);
+ ItemCooldowns.pickaxeUseCooldownMillisRemaining =
+ 60 * 1000 - (System.currentTimeMillis() - ItemCooldowns.firstLoadMillis);
ItemCooldowns.firstLoadMillis = 0;
}
@@ -449,7 +457,7 @@ public class MiningOverlay extends TextTabOverlay {
}
if (starCultDisplay) {
- if(overlayStrings == null) overlayStrings = new ArrayList<>();
+ if (overlayStrings == null) overlayStrings = new ArrayList<>();
if (!NotEnoughUpdates.INSTANCE.config.mining.starCultDisplayOnlyShowTab ||
lastTabState) {
@@ -467,7 +475,7 @@ public class MiningOverlay extends TextTabOverlay {
}
if (forgeDisplay) {
- if(overlayStrings == null) overlayStrings = new ArrayList<>();
+ if (overlayStrings == null) overlayStrings = new ArrayList<>();
if (!NotEnoughUpdates.INSTANCE.config.mining.forgeDisplayOnlyShowTab ||
lastTabState) {
@@ -484,14 +492,97 @@ public class MiningOverlay extends TextTabOverlay {
if (overlayStrings != null && overlayStrings.isEmpty()) overlayStrings = null;
}
+ private String getTipPart(String name) {
+ int settings = NotEnoughUpdates.INSTANCE.config.mining.commissionTaskTips;
+ if (settings == 0) return "";
+
+ if (!Minecraft.getMinecraft().thePlayer.isSneaking() && settings == 1) return "";
+
+ String tip = getTip(name);
+ if (tip == null) return " §4???";
+
+ return " §8§l>§7 " + tip;
+ }
+
+ private String getTip(String name) {
+ if (SBInfo.getInstance().getLocation().equals("mining_3")) { // Dwarven Mines
+ if (name.equals("First Event")) return "Participate in any §6Mining Event";
+
+ // During Event
+ if (name.equals("Lucky Raffle")) return "Collect 20 Raffle Tickets during §6Raffle Event";
+ if (name.equals("Goblin Raid Slayer")) return "Kill 20 Goblins during §6Goblin Raid Event";
+ if (name.equals("Raffle")) return "Participate in §6Raffle Event";
+ if (name.equals("Goblin Raid")) return "Participate in §6Goblin Raid event";
+ if (name.equals("2x Mithril Powder Collector")) return "Collect 500 Mithril Powder during §62x Powder event";
+
+ // Slay
+ if (name.equals("Ice Walker Slayer")) return "Kill 50 Ice Walkers §b(Great Ice Wall)";
+ if (name.equals("Goblin Slayer")) return "Kill 100 Goblins §b(Goblin Borrows)";
+ if (name.equals("Golden Goblin Slayer")) return "Kill 1 Golden Goblin (anywhere)";
+ if (name.equals("Star Sentry Puncher")) return "Damage Star Sentries 10 times (anywhere)";
+
+ // Mining
+ if (name.equals("Mithril Miner")) return "Break 500 Mithril (anywhere)";
+ if (name.equals("Titanium Miner")) return "Break 15 Titanium (anywhere)";
+
+ if (name.equals("Cliffside Veins Mithril")) return "Break 350 Mithril §b(Cliffside Veins)";
+ if (name.equals("Royal Mines Mithril")) return "Break 350 Mithril §b(Royal Mines)";
+ if (name.equals("Lava Springs Mithril")) return "Break 350 Mithril §b(Lava Springs)";
+ if (name.equals("Rampart's Quarry Mithril")) return "Break 350 Mithril §b(Rampart's Quarry)";
+ if (name.equals("Upper Mines Mithril")) return "Break 350 Mithril §b(Upper Mines)";
+
+ if (name.equals("Cliffside Veins Titanium")) return "Break 10 Titanium §b(Cliffside Veins)";
+ if (name.equals("Lava Springs Titanium")) return "Break 10 Titanium §b(Lava Springs)";
+ if (name.equals("Royal Mines Titanium")) return "Break 10 Titanium §b(Royal Mines)";
+ if (name.equals("Rampart's Quarry Titanium")) return "Break 10 Titanium §b(Rampart's Quarry)";
+ if (name.equals("Upper Mines Titanium")) return "Break 10 Titanium §b(Upper Mines)";
+
+ } else if (SBInfo.getInstance().getLocation().equals("crystal_hollows")) { // Crystal Hollows
+ if (name.equals("Chest Looter")) return "Open 3 chests";
+ if (name.equals("Hard Stone Miner")) return "Break 1,000 Hard Stone";
+
+ String jungle = " §a(Jungle)";
+ String goblin = " §6(Golbin Holdout)";
+ String mithril = " §b(Mithril Deposits)";
+ String precursor = " §8(Precursor Remenants)";
+ String magma = " §c(Magma Fields)";
+
+ if (name.equals("Goblin Slayer")) return "Kill 13 Goblins" + goblin;
+ if (name.equals("Sludge Slayer")) return "Kill 25 Sludges" + jungle;
+ if (name.equals("Thyst Slayer")) return "Kill 5 Thysts, when breaking Amethysts" + jungle;
+ if (name.equals("Boss Corleone Slayer")) return "Find and kill Corleone" + mithril;
+ if (name.equals("Yog Slayer")) return "Kill 13 Yogs" + magma;
+ if (name.equals("Automaton Slayer")) return "Kill 13 Automatons" + precursor;
+ if (name.equals("Team Treasurite Member Slayer")) return "Kill 13 Team Treasurite Members" + mithril;
+
+ if (name.endsWith("Crystal Hunter")) {
+ if (name.startsWith("Amethyst")) return "Temple Jump & Run" + jungle;
+ if (name.startsWith("Jade")) return "4 weapons from Mines of Divan" + mithril;
+ if (name.startsWith("Amber")) return "King and Queen" + goblin;
+ if (name.startsWith("Sapphire")) return "6 Robot Parts in Precursor City" + precursor;
+ if (name.startsWith("Topaz")) return "Kill Bal" + magma;
+ }
+
+ if (name.endsWith("Gemstone Collector")) {
+ if (name.startsWith("Amber")) return "Break orange glass" + goblin;
+ if (name.startsWith("Sapphire")) return "Break blue glass" + precursor;
+ if (name.startsWith("Jade")) return "Break green glass" + mithril;
+ if (name.startsWith("Amethyst")) return "Break purple glass" + jungle;
+ if (name.startsWith("Ruby")) return "Break red glass (anywhere)";
+ if (name.startsWith("Topaz")) return "Break yellow glass" + magma;
+ }
+ }
+
+ return null;
+ }
+
private static List<String> getForgeStrings(List<ForgeItem> forgeItems) {
List<String> forgeString = new ArrayList<>();
long currentTimeMillis = System.currentTimeMillis();
forgeIDLabel:
for (int i = 0; i < 5; i++) {
- for (ForgeItem forgeItem : forgeItems) {
- if (forgeItem.forgeID == i) {
- ForgeItem item = forgeItem;
+ for (ForgeItem item : forgeItems) {
+ if (item.forgeID == i) {
if (NotEnoughUpdates.INSTANCE.config.mining.forgeDisplay == 0) {
if (item.status == 2 && item.finishTime < currentTimeMillis) {
@@ -541,7 +632,6 @@ public class MiningOverlay extends TextTabOverlay {
}
}
forgeItems.add(item);
- return;
}
public static class ForgeItem {
@@ -617,6 +707,9 @@ public class MiningOverlay extends TextTabOverlay {
if (!NotEnoughUpdates.INSTANCE.config.mining.dwarvenOverlayIcons) return;
GlStateManager.enableDepth();
+ // No icon for the tip line
+ if (line.contains(">")) return;
+
ItemStack icon = null;
String cleaned = Utils.cleanColour(line);
String beforeColon = cleaned.split(":")[0];