aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/AuctionBINWarning.java25
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/AHTweaks.java13
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java22
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/recipes/MobLootRecipe.java2
4 files changed, 45 insertions, 17 deletions
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 a787ca99..3bae4715 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/AuctionBINWarning.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/AuctionBINWarning.java
@@ -42,8 +42,7 @@ public class AuctionBINWarning extends GuiElement {
private boolean isALoss = true;
private boolean shouldPerformCheck() {
- if (!NotEnoughUpdates.INSTANCE.config.ahTweaks.enableBINWarning ||
- !NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) {
+ if (!NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) {
sellingTooltip = null;
showWarning = false;
return false;
@@ -116,9 +115,15 @@ public class AuctionBINWarning extends GuiElement {
if (overcutFactor < 0) overcutFactor = 0;
if (overcutFactor > 1) overcutFactor = 1;
- if ((sellingPrice > 0 && lowestPrice > 0 && sellingPrice < sellStackAmount * lowestPrice * undercutFactor)
- || (sellingPrice > 0 && lowestPrice > 0 && sellingPrice > sellStackAmount * lowestPrice * (overcutFactor + 1))
- || lowestPrice == -1) {
+ if (lowestPrice == -1) {
+ return false;
+ }
+ if (NotEnoughUpdates.INSTANCE.config.ahTweaks.underCutWarning &&
+ (sellingPrice > 0 && lowestPrice > 0 && sellingPrice < sellStackAmount * lowestPrice * undercutFactor)) {
+ showWarning = true;
+ return true;
+ } else if (NotEnoughUpdates.INSTANCE.config.ahTweaks.overCutWarning &&
+ (sellingPrice > 0 && lowestPrice > 0 && sellingPrice > sellStackAmount * lowestPrice * (overcutFactor + 1))) {
showWarning = true;
return true;
} else {
@@ -181,7 +186,9 @@ public class AuctionBINWarning extends GuiElement {
width / 2, height / 2 - 45 + 25, false, 170, 0xffffffff
);
TextRenderUtils.drawStringCenteredScaledMaxWidth(
- (lowestPrice > 0 ? "has a lowest BIN of \u00a76" + lowestPriceStr + "\u00a7r coins" : "\u00a7cWarning: No lowest BIN found!"),
+ (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,
@@ -194,12 +201,11 @@ public class AuctionBINWarning extends GuiElement {
buyPercentage = sellingPrice * 100 / (lowestPrice * sellStackAmount);
isALoss = false;
} else if (sellingPrice < lowestPrice * sellStackAmount) {
- buyPercentage = 100 - sellingPrice * 100 / (lowestPrice * sellStackAmount);
+ buyPercentage = 100 - sellingPrice * 100 / (lowestPrice * sellStackAmount);
if (buyPercentage <= 0) buyPercentage = 1;
isALoss = true;
}
-
TextRenderUtils.drawStringCenteredScaledMaxWidth(
"Continue selling it for",
Minecraft.getMinecraft().fontRendererObj,
@@ -210,7 +216,8 @@ public class AuctionBINWarning extends GuiElement {
0xffa0a0a0
);
TextRenderUtils.drawStringCenteredScaledMaxWidth(
- "\u00a76" + sellingPriceStr + "\u00a7r coins?" + (lowestPrice > 0 ? "(\u00a7" + (isALoss ? "c-" : "a+") + buyPercentage + "%\u00a7r)" : ""),
+ "\u00a76" + sellingPriceStr + "\u00a7r coins?" +
+ (lowestPrice > 0 ? "(\u00a7" + (isALoss ? "c-" : "a+") + buyPercentage + "%\u00a7r)" : ""),
Minecraft.getMinecraft().fontRendererObj,
width / 2,
height / 2 - 45 + 59,
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 63c4fe8d..c4651b02 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
@@ -57,12 +57,21 @@ public class AHTweaks {
@Expose
@ConfigOption(
- name = "Enable BIN Warning",
+ name = "Enable Undercut BIN Warning",
desc = "Ask for confirmation when BINing an item for below X% of lowestbin"
)
@ConfigEditorBoolean
@ConfigAccordionId(id = 1)
- public boolean enableBINWarning = true;
+ public boolean underCutWarning = true;
+
+ @Expose
+ @ConfigOption(
+ name = "Enable Overcut BIN Warning",
+ desc = "Ask for confirmation when BINing an item for over X% of lowestbin"
+ )
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 1)
+ public boolean overCutWarning = true;
@Expose
@ConfigOption(
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
index 1729cfa7..ee73f66f 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
@@ -7,7 +7,6 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import com.mojang.authlib.GameProfile;
-import io.github.moulberry.notenoughupdates.NEUOverlay;
import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
import io.github.moulberry.notenoughupdates.cosmetics.ShaderManager;
import io.github.moulberry.notenoughupdates.itemeditor.GuiElementTextField;
@@ -1931,18 +1930,22 @@ public class GuiProfileViewer extends GuiScreen {
if (levelObj.maxed) {
renderGoldBar(x, y + 6, xSize);
} else {
- renderBar(x, y + 6, xSize, level % 1);
+ if (skillName.contains("Catacombs") && levelObj.level >= 50) {
+ renderGoldBar(x, y + 6, xSize);
+ } else {
+ renderBar(x, y + 6, xSize, level % 1);
+ }
}
if (mouseX > x && mouseX < x + 120) {
if (mouseY > y - 4 && mouseY < y + 13) {
String levelStr;
String totalXpStr = null;
+ if (skillName.contains("Catacombs"))
+ totalXpStr = EnumChatFormatting.GRAY + "Total XP: " + EnumChatFormatting.DARK_PURPLE +
+ Utils.formatNumberWithDots((long) levelObj.totalXp);
if (levelObj.maxed) {
levelStr = EnumChatFormatting.GOLD + "MAXED!";
- if (skillName.contains("Catacombs"))
- totalXpStr = EnumChatFormatting.GRAY + "Total XP: " + EnumChatFormatting.DARK_PURPLE +
- Utils.formatNumberWithDots((long) levelObj.totalXp);
} else {
int maxXp = (int) levelObj.maxXpForLevel;
levelStr = EnumChatFormatting.DARK_PURPLE + shortNumberFormat(
@@ -3420,6 +3423,8 @@ public class GuiProfileViewer extends GuiScreen {
Utils.getElementAsFloat(Utils.getElement(profileInfo, "stats.items_fished_treasure"), 0);
float items_fished_large_treasure =
Utils.getElementAsFloat(Utils.getElement(profileInfo, "stats.items_fished_large_treasure"), 0);
+ float items_fished_trophy_fish =
+ Utils.getElementAsFloat(Utils.getElement(profileInfo, "stats.items_fished_trophy_fish"), 0);
Utils.renderAlignedString(
EnumChatFormatting.GREEN + "Ores Mined",
@@ -3457,6 +3462,13 @@ public class GuiProfileViewer extends GuiScreen {
guiTop + yStartTop + yOffset * 5,
76
);
+ Utils.renderAlignedString(
+ EnumChatFormatting.GREEN + "Trophy Fish Fished",
+ EnumChatFormatting.WHITE.toString() + (int) items_fished_trophy_fish,
+ guiLeft + xStart + xOffset * 2,
+ guiTop + yStartTop + yOffset * 6,
+ 76
+ );
if (topKills == null) {
topKills = new TreeMap<>();
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/recipes/MobLootRecipe.java b/src/main/java/io/github/moulberry/notenoughupdates/recipes/MobLootRecipe.java
index b98fbe10..a65bfec2 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/recipes/MobLootRecipe.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/recipes/MobLootRecipe.java
@@ -233,7 +233,7 @@ public class MobLootRecipe implements NeuRecipe {
if (xp > 0)
stuff.add("§r§aExperience: " + xp);
if (combatXp > 0)
- stuff.add("§r§bCombat Experience: " + xp);
+ stuff.add("§r§bCombat Experience: " + combatXp);
stuff.addAll(extra);
Utils.drawHoveringText(
stuff,