aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java3
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/profile/CataCommand.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorDraggableList.java1
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDraggableList.java25
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/config/struct/ConfigProcessor.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java41
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java7
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/AuctionBINWarning.java48
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java16
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/AHTweaks.java17
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java10
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ProfileViewer.java63
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingOverlay.java15
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BingoPage.java309
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java1333
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java377
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/HypixelApi.java9
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java2
18 files changed, 1468 insertions, 812 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
index d9566f0d..5ad02f94 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
@@ -1361,7 +1361,8 @@ public class NEUOverlay extends Gui {
"DUNGEON SWORD",
"DUNGEON BOW",
"DRILL",
- "GAUNTLET"
+ "GAUNTLET",
+ "LONGSWORD"
) >= 0;
} else if (getSortMode() == SORT_MODE_ARMOR) {
return checkItemType(
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/profile/CataCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/profile/CataCommand.java
index 09253e50..ccf72d73 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/profile/CataCommand.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/profile/CataCommand.java
@@ -11,7 +11,7 @@ public class CataCommand extends ViewProfileCommand {
@Override
public void processCommand(ICommandSender sender, String[] args) {
- GuiProfileViewer.currentPage = GuiProfileViewer.ProfileViewerPage.DUNG;
+ GuiProfileViewer.currentPage = GuiProfileViewer.ProfileViewerPage.DUNGEON;
super.processCommand(sender, args);
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorDraggableList.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorDraggableList.java
index e171e0ae..5063d543 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorDraggableList.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorDraggableList.java
@@ -9,4 +9,5 @@ import java.lang.annotation.Target;
@Target(ElementType.FIELD)
public @interface ConfigEditorDraggableList {
String[] exampleText();
+ boolean allowRemovingElements() default true;
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDraggableList.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDraggableList.java
index 08a1024f..df373dbf 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDraggableList.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDraggableList.java
@@ -24,6 +24,7 @@ public class GuiOptionEditorDraggableList extends GuiOptionEditor {
private static final ResourceLocation DELETE = new ResourceLocation("notenoughupdates:core/delete.png");
private final String[] exampleText;
+ private final boolean allowRemovingElements;
private final List<Integer> activeText;
private int currentDragging = -1;
private int dragStartIndex = -1;
@@ -35,9 +36,14 @@ public class GuiOptionEditorDraggableList extends GuiOptionEditor {
private boolean dropdownOpen = false;
- public GuiOptionEditorDraggableList(ConfigProcessor.ProcessedOption option, String[] exampleText) {
+ public GuiOptionEditorDraggableList(
+ ConfigProcessor.ProcessedOption option,
+ String[] exampleText,
+ boolean allowRemovingElements
+ ) {
super(option);
+ this.allowRemovingElements = allowRemovingElements;
this.exampleText = exampleText;
this.activeText = (List<Integer>) option.get();
}
@@ -77,8 +83,11 @@ public class GuiOptionEditorDraggableList extends GuiOptionEditor {
float greenBlue = LerpUtils.clampZeroOne((250 + trashHoverTime - currentTime) / 250f);
GlStateManager.color(1, greenBlue, greenBlue, 1);
}
- Minecraft.getMinecraft().getTextureManager().bindTexture(DELETE);
- Utils.drawTexturedRect(x + width / 6 + 27, y + 45 - 7 - 13, 11, 14, GL11.GL_NEAREST);
+
+ if (allowRemovingElements) {
+ Minecraft.getMinecraft().getTextureManager().bindTexture(DELETE);
+ Utils.drawTexturedRect(x + width / 6 + 27, y + 45 - 7 - 13, 11, 14, GL11.GL_NEAREST);
+ }
Gui.drawRect(x + 5, y + 45, x + width - 5, y + height - 5, 0xffdddddd);
Gui.drawRect(x + 6, y + 46, x + width - 6, y + height - 6, 0xff000000);
@@ -206,7 +215,9 @@ public class GuiOptionEditorDraggableList extends GuiOptionEditor {
dragStartIndex >= 0 && Mouse.getEventButton() == 0 &&
mouseX >= x + width / 6 + 27 - 3 && mouseX <= x + width / 6 + 27 + 11 + 3 &&
mouseY >= y + 45 - 7 - 13 - 3 && mouseY <= y + 45 - 7 - 13 + 14 + 3) {
- activeText.remove(dragStartIndex);
+ if (allowRemovingElements) {
+ activeText.remove(dragStartIndex);
+ }
currentDragging = -1;
dragStartIndex = -1;
return false;
@@ -215,13 +226,13 @@ public class GuiOptionEditorDraggableList extends GuiOptionEditor {
if (!Mouse.isButtonDown(0) || dropdownOpen) {
currentDragging = -1;
dragStartIndex = -1;
- if (trashHoverTime > 0) trashHoverTime = -System.currentTimeMillis();
+ if (trashHoverTime > 0 && allowRemovingElements) trashHoverTime = -System.currentTimeMillis();
} else if (currentDragging >= 0 &&
mouseX >= x + width / 6 + 27 - 3 && mouseX <= x + width / 6 + 27 + 11 + 3 &&
mouseY >= y + 45 - 7 - 13 - 3 && mouseY <= y + 45 - 7 - 13 + 14 + 3) {
- if (trashHoverTime < 0) trashHoverTime = System.currentTimeMillis();
+ if (trashHoverTime < 0 && allowRemovingElements) trashHoverTime = System.currentTimeMillis();
} else {
- if (trashHoverTime > 0) trashHoverTime = -System.currentTimeMillis();
+ if (trashHoverTime > 0 && allowRemovingElements) trashHoverTime = -System.currentTimeMillis();
}
if (Mouse.getEventButtonState()) {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/struct/ConfigProcessor.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/struct/ConfigProcessor.java
index b5aa6ba8..3eb8a2d1 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/struct/ConfigProcessor.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/struct/ConfigProcessor.java
@@ -147,7 +147,7 @@ public class ConfigProcessor {
if (optionField.isAnnotationPresent(ConfigEditorDraggableList.class)) {
ConfigEditorDraggableList configEditorAnnotation =
optionField.getAnnotation(ConfigEditorDraggableList.class);
- editor = new GuiOptionEditorDraggableList(option, configEditorAnnotation.exampleText());
+ editor = new GuiOptionEditorDraggableList(option, configEditorAnnotation.exampleText(), configEditorAnnotation.allowRemovingElements());
}
}
if (optionType.isAssignableFrom(String.class)) {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java
index 592f5b19..e132d287 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java
@@ -578,8 +578,8 @@ public class DungeonMap {
GlStateManager.rotate(-rotation + 180, 0, 0, 1);
if (NotEnoughUpdates.INSTANCE.config.dungeonMap.dmCenterPlayer && playerPos != null) {
- float x = playerPos.getRenderX();
- float y = playerPos.getRenderY();
+ float x = playerPos.getRenderX(0);
+ float y = playerPos.getRenderY(0);
x -= minRoomX * (renderRoomSize + renderConnSize);
y -= minRoomY * (renderRoomSize + renderConnSize);
@@ -648,8 +648,8 @@ public class DungeonMap {
for (Map.Entry<String, MapPosition> entry : playerMarkerMapPositions.entrySet()) {
String name = entry.getKey();
MapPosition pos = entry.getValue();
- float x = pos.getRenderX();
- float y = pos.getRenderY();
+ float x = pos.getRenderX(0);
+ float y = pos.getRenderY(0);
float angle = pos.rotation;
boolean doInterp = NotEnoughUpdates.INSTANCE.config.dungeonMap.dmPlayerInterp;
@@ -657,19 +657,8 @@ public class DungeonMap {
MapPosition entityPos = playerEntityMapPositions.get(name);
angle = entityPos.rotation;
- float deltaX = entityPos.getRenderX() - pos.getRenderX();
- float deltaY = entityPos.getRenderY() - pos.getRenderY();
-
- /*if(deltaX > (renderRoomSize + renderConnSize)/2) {
- deltaX -= (renderRoomSize + renderConnSize);
- } else if(deltaX < -(renderRoomSize + renderConnSize)/2) {
- deltaX += (renderRoomSize + renderConnSize);
- }
- if(deltaY > (renderRoomSize + renderConnSize)/2) {
- deltaY -= (renderRoomSize + renderConnSize);
- } else if(deltaY < -(renderRoomSize + renderConnSize)/2) {
- deltaY += (renderRoomSize + renderConnSize);
- }*/
+ float deltaX = entityPos.getRenderX(9) - pos.getRenderX(0);
+ float deltaY = entityPos.getRenderY(9) - pos.getRenderY(0);
x += deltaX;
y += deltaY;
@@ -689,8 +678,8 @@ public class DungeonMap {
if (doInterp && playerMarkerMapPositionsLast.containsKey(name)) {
MapPosition last = playerMarkerMapPositionsLast.get(name);
- float xLast = last.getRenderX();
- float yLast = last.getRenderY();
+ float xLast = last.getRenderX(0);
+ float yLast = last.getRenderY(0);
float distSq = (x - xLast) * (x - xLast) + (y - yLast) * (y - yLast);
if (distSq < renderRoomSize * renderRoomSize / 4f) {
@@ -1087,12 +1076,12 @@ public class DungeonMap {
this.connOffsetY = connOffsetY;
}
- public float getRenderX() {
- return roomOffsetX * getRenderRoomSize() + connOffsetX * getRenderConnSize();
+ public float getRenderX(int blockOffset) {
+ return (roomOffsetX + blockOffset) * getRenderRoomSize() + connOffsetX * getRenderConnSize();
}
- public float getRenderY() {
- return roomOffsetY * getRenderRoomSize() + connOffsetY * getRenderConnSize();
+ public float getRenderY(int blockOffset) {
+ return (roomOffsetY + blockOffset) * getRenderRoomSize() + connOffsetY * getRenderConnSize();
}
@Override
@@ -1153,7 +1142,7 @@ public class DungeonMap {
String line = ScorePlayerTeam.formatPlayerName(scoreplayerteam1, score.getPlayerName());
line = Utils.cleanColour(line);
- if (line.contains("(F1)") || line.contains("(E0)") || line.contains("(M1)")) {
+ if (line.contains("(F1)") || line.contains("(E)") || line.contains("(M1)")) {
isFloorOne = true;
break;
}
@@ -1425,8 +1414,8 @@ public class DungeonMap {
for (Map.Entry<String, MapPosition> entry : playerMarkerMapPositionsLast.entrySet()) {
HashMap<Integer, Float> deltaDists = new HashMap<>();
for (int i = 0; i < positions.size(); i++) {
- float dx = entry.getValue().getRenderX() - positions.get(i).getRenderX();
- float dy = entry.getValue().getRenderY() - positions.get(i).getRenderY();
+ float dx = entry.getValue().getRenderX(0) - positions.get(i).getRenderX(0);
+ float dy = entry.getValue().getRenderY(0) - positions.get(i).getRenderY(0);
deltaDists.put(i, dx * dx + dy * dy);
}
distanceMap.put(entry.getKey(), deltaDists);
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java
index 976dfcf8..66389beb 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java
@@ -200,7 +200,12 @@ public class DungeonWin {
displayWin();
} else {
if (unformatted.trim().length() > 0) {
- text.add(e.message.getFormattedText().substring(6).trim());
+ if (unformatted.contains("The Catacombs") || unformatted.contains("Master Mode Catacombs") || unformatted.contains("Team Score") || unformatted.contains("Defeated") || unformatted.contains("Total Damage")
+ || unformatted.contains("Ally Healing") || unformatted.contains("Enemies Killed") || unformatted.contains("Deaths") || unformatted.contains("Secrets Found")) {
+ text.add(e.message.getFormattedText().substring(6).trim());
+ } else {
+ System.out.println("These messages would of showed on neu dungeon overlay but didnt, They are either bugged or i missed them: \"" + e.message.getFormattedText().substring(6).trim() + "\"");
+ }
}
}
} else {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/AuctionBINWarning.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/AuctionBINWarning.java
index c76a22b4..c7bcc0e1 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/AuctionBINWarning.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/AuctionBINWarning.java
@@ -37,6 +37,7 @@ public class AuctionBINWarning extends GuiElement {
private String sellingName;
private int sellingPrice;
private int lowestPrice;
+ private int sellStackAmount;
private boolean shouldPerformCheck() {
if (!NotEnoughUpdates.INSTANCE.config.ahTweaks.enableBINWarning ||
@@ -83,6 +84,7 @@ public class AuctionBINWarning extends GuiElement {
ItemStack sellStack = chest.inventorySlots.getSlot(13).getStack();
String internalname = NotEnoughUpdates.INSTANCE.manager.getInternalNameForItem(sellStack);
+ sellStackAmount = sellStack.stackSize;
if (internalname == null) {
return false;
@@ -105,13 +107,17 @@ public class AuctionBINWarning extends GuiElement {
lowestPrice = (int) NotEnoughUpdates.INSTANCE.manager.auctionManager.getItemAvgBin(internalname);
}
- //TODO: Add option for warning if lowest price does not exist
-
- float factor = 1 - NotEnoughUpdates.INSTANCE.config.ahTweaks.warningThreshold / 100;
- if (factor < 0) factor = 0;
- if (factor > 1) factor = 1;
-
- if (sellingPrice > 0 && lowestPrice > 0 && sellingPrice < lowestPrice * factor) {
+ float undercutFactor = 1 - NotEnoughUpdates.INSTANCE.config.ahTweaks.warningThreshold / 100;
+ if (undercutFactor < 0) undercutFactor = 0;
+ if (undercutFactor > 1) undercutFactor = 1;
+ float overcutFactor = 1 + NotEnoughUpdates.INSTANCE.config.ahTweaks.overcutWarningThreshold / 100;
+ if (overcutFactor < 0) overcutFactor = 0;
+
+ if (
+ (sellingPrice > 0 && lowestPrice > 0 &&
+ ((sellingPrice > sellStackAmount * lowestPrice * overcutFactor) ||
+ sellingPrice < sellStackAmount * lowestPrice * undercutFactor))
+ || lowestPrice == -1) {
showWarning = true;
return true;
} else {
@@ -155,10 +161,10 @@ public class AuctionBINWarning extends GuiElement {
);
String lowestPriceStr;
- if (lowestPrice > 999) {
- lowestPriceStr = Utils.shortNumberFormat(lowestPrice, 0);
+ if (lowestPrice * sellStackAmount > 999) {
+ lowestPriceStr = Utils.shortNumberFormat(lowestPrice * sellStackAmount, 0);
} else {
- lowestPriceStr = "" + lowestPrice;
+ lowestPriceStr = "" + lowestPrice * sellStackAmount;
}
String sellingPriceStr;
@@ -174,7 +180,9 @@ public class AuctionBINWarning extends GuiElement {
width / 2, height / 2 - 45 + 25, false, 170, 0xffffffff
);
TextRenderUtils.drawStringCenteredScaledMaxWidth(
- "has a lowest BIN of \u00a76" + lowestPriceStr + "\u00a7r coins",
+ (lowestPrice > 0
+ ? "has a lowest BIN of \u00a76" + lowestPriceStr + "\u00a7r coins"
+ : "\u00a7cWarning: No lowest BIN found!"),
Minecraft.getMinecraft().fontRendererObj,
width / 2,
height / 2 - 45 + 34,
@@ -183,8 +191,15 @@ public class AuctionBINWarning extends GuiElement {
0xffa0a0a0
);
- int buyPercentage = 100 - sellingPrice * 100 / lowestPrice;
- if (buyPercentage <= 0) buyPercentage = 1;
+ boolean isALoss = false;
+ int buyPercentage = 0;
+ if (sellingPrice > lowestPrice * sellStackAmount) {
+ buyPercentage = sellingPrice * 100 / (lowestPrice * sellStackAmount) - 100;
+ isALoss = false;
+ } else if (sellingPrice < lowestPrice * sellStackAmount) {
+ buyPercentage = 100 - sellingPrice * 100 / (lowestPrice * sellStackAmount);
+ isALoss = true;
+ }
TextRenderUtils.drawStringCenteredScaledMaxWidth(
"Continue selling it for",
@@ -196,7 +211,10 @@ public class AuctionBINWarning extends GuiElement {
0xffa0a0a0
);
TextRenderUtils.drawStringCenteredScaledMaxWidth(
- "\u00a76" + sellingPriceStr + "\u00a7r coins? (\u00a7c-" + buyPercentage + "%\u00a7r)",
+ "\u00a76" + sellingPriceStr + "\u00a7r coins?" +
+ ((lowestPrice > 0 && buyPercentage > 0)
+ ? "(\u00a7" + (isALoss ? "c-" : "a+") + buyPercentage + "%\u00a7r)"
+ : ""),
Minecraft.getMinecraft().fontRendererObj,
width / 2,
height / 2 - 45 + 59,
@@ -218,7 +236,7 @@ public class AuctionBINWarning extends GuiElement {
0xff00ff00
);
TextRenderUtils.drawStringCenteredScaledMaxWidth(
- EnumChatFormatting.RED + "[n]o",
+ EnumChatFormatting.RED + "[N]o",
Minecraft.getMinecraft().fontRendererObj,
width / 2 + 23,
height / 2 + 31,
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java b/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java
index 1d03a2d1..25c47fce 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java
@@ -12,20 +12,20 @@ import io.github.moulberry.notenoughupdates.miscgui.GuiEnchantColour;
import io.github.moulberry.notenoughupdates.miscgui.GuiInvButtonEditor;
import io.github.moulberry.notenoughupdates.miscgui.NEUOverlayPlacements;
import io.github.moulberry.notenoughupdates.options.customtypes.NEUDebugFlag;
-import io.github.moulberry.notenoughupdates.options.seperateSections.AccessoryBag;
import io.github.moulberry.notenoughupdates.options.seperateSections.AHGraph;
import io.github.moulberry.notenoughupdates.options.seperateSections.AHTweaks;
+import io.github.moulberry.notenoughupdates.options.seperateSections.AccessoryBag;
import io.github.moulberry.notenoughupdates.options.seperateSections.ApiKey;
import io.github.moulberry.notenoughupdates.options.seperateSections.Calendar;
import io.github.moulberry.notenoughupdates.options.seperateSections.CustomArmour;
-import io.github.moulberry.notenoughupdates.options.seperateSections.Dungeons;
import io.github.moulberry.notenoughupdates.options.seperateSections.DungeonMapConfig;
+import io.github.moulberry.notenoughupdates.options.seperateSections.Dungeons;
import io.github.moulberry.notenoughupdates.options.seperateSections.Enchanting;
import io.github.moulberry.notenoughupdates.options.seperateSections.Fishing;
import io.github.moulberry.notenoughupdates.options.seperateSections.ImprovedSBMenu;
import io.github.moulberry.notenoughupdates.options.seperateSections.InventoryButtons;
-import io.github.moulberry.notenoughupdates.options.seperateSections.Itemlist;
import io.github.moulberry.notenoughupdates.options.seperateSections.ItemOverlays;
+import io.github.moulberry.notenoughupdates.options.seperateSections.Itemlist;
import io.github.moulberry.notenoughupdates.options.seperateSections.LocationEdit;
import io.github.moulberry.notenoughupdates.options.seperateSections.Mining;
import io.github.moulberry.notenoughupdates.options.seperateSections.Misc;
@@ -33,9 +33,10 @@ import io.github.moulberry.notenoughupdates.options.seperateSections.MiscOverlay
import io.github.moulberry.notenoughupdates.options.seperateSections.NeuAuctionHouse;
import io.github.moulberry.notenoughupdates.options.seperateSections.Notifications;
import io.github.moulberry.notenoughupdates.options.seperateSections.PetOverlay;
+import io.github.moulberry.notenoughupdates.options.seperateSections.ProfileViewer;
+import io.github.moulberry.notenoughupdates.options.seperateSections.SkillOverlays;
import io.github.moulberry.notenoughupdates.options.seperateSections.SlayerOverlay;
import io.github.moulberry.notenoughupdates.options.seperateSections.SlotLocking;
-import io.github.moulberry.notenoughupdates.options.seperateSections.SkillOverlays;
import io.github.moulberry.notenoughupdates.options.seperateSections.StorageGUI;
import io.github.moulberry.notenoughupdates.options.seperateSections.Toolbar;
import io.github.moulberry.notenoughupdates.options.seperateSections.TooltipTweaks;
@@ -327,6 +328,13 @@ public class NEUConfig extends Config {
@Expose
@Category(
+ name = "Profile Viewer",
+ desc = "Profile Viewer"
+ )
+ public ProfileViewer profileViewer = new ProfileViewer();
+
+ @Expose
+ @Category(
name = "Api Key",
desc = "Api Key"
)
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/AHTweaks.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/AHTweaks.java
index 0d21a96f..63c4fe8d 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/AHTweaks.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/AHTweaks.java
@@ -66,8 +66,8 @@ public class AHTweaks {
@Expose
@ConfigOption(
- name = "Warning Threshold",
- desc = "Threshold for BIN warning\nExample: 10% means warn if sell price is 10% lower than lowestbin"
+ name = "Undercut Warning Threshold",
+ desc = "Threshold for BIN warning\nExample: 10% means warn if sell price is 10% lower than lowest bin"
)
@ConfigEditorSlider(
minValue = 0.0f,
@@ -77,6 +77,19 @@ public class AHTweaks {
@ConfigAccordionId(id = 1)
public float warningThreshold = 10f;
+ @Expose
+ @ConfigOption(
+ name = "Overcut Warning Threshold",
+ desc = "Threshold for BIN warning\nExample: 50% means warn if sell price is 50% higher than lowest bin"
+ )
+ @ConfigEditorSlider(
+ minValue = 0.0f,
+ maxValue = 100.0f,
+ minStep = 5f
+ )
+ @ConfigAccordionId(id = 1)
+ public float overcutWarningThreshold = 50f;
+
@ConfigOption(
name = "Sort Warning",
desc = ""
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java
index 058b13d8..e872bfc0 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java
@@ -1,7 +1,13 @@
package io.github.moulberry.notenoughupdates.options.seperateSections;
import com.google.gson.annotations.Expose;
-import io.github.moulberry.notenoughupdates.core.config.annotations.*;
+import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigAccordionId;
+import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorAccordion;
+import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorBoolean;
+import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorButton;
+import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorDropdown;
+import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorSlider;
+import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigOption;
public class Misc {
@Expose
@@ -141,4 +147,4 @@ public class Misc {
@ConfigEditorBoolean
public boolean disableNPCRetexturing = false;
-} \ No newline at end of file
+}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ProfileViewer.java
new file mode 100644
index 00000000..2e1d0619
--- /dev/null
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ProfileViewer.java
@@ -0,0 +1,63 @@
+package io.github.moulberry.notenoughupdates.options.seperateSections;
+
+import com.google.gson.annotations.Expose;
+import io.github.moulberry.notenoughupdates.core.config.annotations.*;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class ProfileViewer {
+
+ @ConfigOption(
+ name = "Profile Viewer info",
+ desc =
+ "The Profile Viewer requires you to have an \u00A72api key\u00A77 set (if you don't have one set do \u00A72/api new\u00A77)\n"
+ )
+ @ConfigEditorFSR(
+ runnableId = 12,
+ buttonText = ""
+ )
+ public boolean pvInfo = false;
+
+ @Expose
+ @ConfigOption(
+ name = "Open Profile Viewer",
+ desc = "Brings up the profile viewer (/pv)\n" +
+ "Shows stats and networth of players"
+ )
+ @ConfigEditorButton(
+ runnableId = 13,
+ buttonText = "Open"
+ )
+ public boolean openPV = true;
+
+ @Expose
+ @ConfigOption(
+ name = "Page layout",
+ desc = "\u00a7rSelect the order of the pages at the top of the Profile Viewer\n" +
+ "\u00a7eDrag text to rearrange"
+ )
+ @ConfigEditorDraggableList(
+ exampleText = {
+ "\u00a7eBasic Info",
+ "\u00a7eDungeons",
+ "\u00a7eExtra Info",
+ "\u00a7eInventories",
+ "\u00a7eCollections",
+ "\u00a7ePets",
+ "\u00a7eMining",
+ "\u00a7eBingo",
+ },
+ allowRemovingElements = false
+ )
+ public List<Integer> pageLayout = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7));
+
+ @Expose
+ @ConfigOption(
+ name = "Always show bingo tab",
+ desc = "Always show bingo tab or only show it when the bingo profile is selected"
+ )
+ @ConfigEditorBoolean
+ public boolean alwaysShowBingoTab = false;
+}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingOverlay.java
index f2c7e396..bbab59cb 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingOverlay.java
@@ -175,18 +175,17 @@ public class FarmingOverlay extends TextOverlay {
}
if (!NotEnoughUpdates.INSTANCE.config.skillOverlays.useBZPrice || internalname != null && (internalname.equals(
- "TREECAPITATOR_AXE"))
- || internalname != null && (internalname.equals("JUNGLE_AXE"))) {
- if (internalname != null && internalname.startsWith("THEORETICAL_HOE_WARTS") ||
- (internalname != null && internalname.equals("COCO_CHOPPER"))) {
+ "TREECAPITATOR_AXE")) || internalname != null && (internalname.equals("JUNGLE_AXE"))) {
+ if ((internalname != null && internalname.equals("COCO_CHOPPER"))) {
Coins = 3;
} else if (internalname != null && internalname.startsWith("THEORETICAL_HOE_POTATO") ||
- (internalname != null && internalname.startsWith("THEORETICAL_HOE_CARROT"))
- || (internalname != null && internalname.equals("CACTUS_KNIFE")) ||
+ (internalname != null && internalname.startsWith("THEORETICAL_HOE_CARROT")) ||
+ (internalname != null && internalname.equals("CACTUS_KNIFE")) ||
(internalname != null && internalname.startsWith("THEORETICAL_HOE_WHEAT"))) {
Coins = 1;
- } else if (internalname != null && internalname.startsWith("THEORETICAL_HOE_CANE") ||
- (internalname != null && internalname.equals("TREECAPITATOR_AXE"))
+ } else if (internalname != null && internalname.startsWith("THEORETICAL_HOE_CANE")
+ || (internalname != null && internalname.equals("TREECAPITATOR_AXE"))
+ || (internalname != null && internalname.startsWith("THEORETICAL_HOE_WARTS"))
|| (internalname != null && internalname.equals("JUNGLE_AXE"))) {
Coins = 2;
} else if ((internalname != null && internalname.equals("PUMPKIN_DICER")) ||
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BingoPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BingoPage.java
new file mode 100644
index 00000000..60d1e513
--- /dev/null
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BingoPage.java
@@ -0,0 +1,309 @@
+package io.github.moulberry.notenoughupdates.profileviewer;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
+import io.github.moulberry.notenoughupdates.util.Utils;
+import net.minecraft.client.Minecraft;
+import net.mi