aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Update Notes/2.1.md3
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java38
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java1
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java8
4 files changed, 43 insertions, 7 deletions
diff --git a/Update Notes/2.1.md b/Update Notes/2.1.md
index 338c898e..1a120dfb 100644
--- a/Update Notes/2.1.md
+++ b/Update Notes/2.1.md
@@ -17,7 +17,7 @@
- Add built-in recipes for forge crafts - nea89
- Add Stranded Villager Trades to the item list - nea89
- Make cata xp in /pv be calculated on how many runs you have and shows master mode xp rates
-- Hide mine waypoints when at location setting - Lulonaut
+- Added a config option to hide Dwarven Mines waypoints when already at the location - Lulonaut
- Added some info panels to some settings in /neu
- Added Kat Level After Upgrade Estimator - nea89
- Added /pv button in /neu
@@ -55,6 +55,7 @@
- Added a way to include kismet feather to profit calculator - efefury
- Added custom sounds for crystal hollow gemstones - nea89
- Added custom biomes for crystal hollow areas - nopo
+- Added a config option to hide the reforge stats for Legendary items from Hypixel on reforge stones - Lulonaut
### **Bug Fixes**
- Fix wiki pages freezing the entire game - nea89
- Made titanium overlay and waypoints work with dwarven overlay off
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
index 10755305..6af0d057 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
@@ -53,15 +53,14 @@ import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
-import javax.swing.JOptionPane;
-import javax.swing.JTextField;
-import java.awt.Color;
-import java.awt.Toolkit;
+import javax.swing.*;
+import java.awt.*;
import java.awt.datatransfer.StringSelection;
import java.io.File;
import java.io.IOException;
import java.text.DecimalFormat;
import java.text.NumberFormat;
+import java.util.List;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@@ -2575,16 +2574,45 @@ public class NEUEventListener {
DecimalFormat myFormatter = new DecimalFormat("###,###.###");
/**
- * This makes it so that holding LCONTROL while hovering over an item with NBT will show the NBT of the item.
+ * This method does the following:
+ * Move the pet inventory display tooltip to the left to avoid conflicts
+ * Remove reforge stats for Legendary items from Hypixel if enabled
+ * Show NBT data when holding LCONTROL
*/
@SubscribeEvent
public void onItemTooltip(ItemTooltipEvent event) {
if (!neu.isOnSkyblock()) return;
+ if (event.toolTip == null) return;
//Render the pet inventory display tooltip to the left to avoid things from other mods rendering over the tooltip
if (event.itemStack.getTagCompound() != null && event.itemStack.getTagCompound().getBoolean("NEUPETINVDISPLAY")) {
GlStateManager.translate(-200, 0, 0);
}
+ if (event.toolTip.size() > 2 && NotEnoughUpdates.INSTANCE.config.tooltipTweaks.hideDefaultReforgeStats) {
+ String secondLine = StringUtils.stripControlCodes(event.toolTip.get(1));
+ if (secondLine.equals("Reforge Stone")) {
+ Integer startIndex = null;
+ Integer cutoffIndex = null;
+ //loop from the back of the List to find the wanted index sooner
+ for (int i = event.toolTip.size() - 1; i >= 0; i--) {
+ //rarity or mining level requirement
+ String line = StringUtils.stripControlCodes(event.toolTip.get(i));
+ if (line.contains("REFORGE STONE") || line.contains("Requires Mining Skill Level")) {
+ cutoffIndex = i;
+ }
+
+ //The line where the Hypixel stats start
+ if (line.contains("(Legendary):")) {
+ startIndex = i;
+ break;
+ }
+ }
+ if (startIndex != null && cutoffIndex != null && startIndex < cutoffIndex) {
+ event.toolTip.subList(startIndex, cutoffIndex).clear();
+ }
+ }
+ }
+
if (Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && NotEnoughUpdates.INSTANCE.config.hidden.dev &&
event.toolTip.size() > 0 && event.toolTip.get(event.toolTip.size() - 1).startsWith(EnumChatFormatting.DARK_GRAY + "NBT: ")) {
event.toolTip.remove(event.toolTip.size() - 1);
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
index 0cff5de1..e6cfd7c0 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
@@ -39,7 +39,6 @@ import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
-import scala.collection.parallel.ParIterableLike;
import java.awt.*;
import java.io.*;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java
index 78dc1995..fcbc5ea4 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java
@@ -96,6 +96,14 @@ public class TooltipTweaks {
@Expose
@ConfigOption(
+ name = "Hide default reforge stats",
+ desc = "Hides the reforge stats only for Legendary items that Hypixel adds to the Reforge stones"
+ )
+ @ConfigEditorBoolean
+ public boolean hideDefaultReforgeStats = true;
+
+ @Expose
+ @ConfigOption(
name = "Missing Enchant List",
desc = "Show which enchants are missing on an item when pressing LSHIFT"
)