aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/BetterContainers.java5
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/CalendarOverlay.java60
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java270
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java8
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java5
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java42
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java51
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java3
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/Options.java23
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java11
-rw-r--r--src/main/resources/assets/notenoughupdates/dungeon_chest_worth.pngbin1900 -> 2064 bytes
12 files changed, 321 insertions, 159 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/BetterContainers.java b/src/main/java/io/github/moulberry/notenoughupdates/BetterContainers.java
index 07fff01b..02ff2164 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/BetterContainers.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/BetterContainers.java
@@ -19,6 +19,8 @@ import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.input.Keyboard;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL14;
import javax.imageio.ImageIO;
import java.awt.*;
@@ -90,6 +92,9 @@ public class BetterContainers {
if(texture != null && loaded) {
if(!usingCached) lastRenderMillis = System.currentTimeMillis();
lastRenderMillis = System.currentTimeMillis();
+
+ GlStateManager.color(1, 1, 1, 1);
+
textureManager.loadTexture(rl, texture);
textureManager.bindTexture(rl);
return;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/CalendarOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/CalendarOverlay.java
index ff6c500b..db168747 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/CalendarOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/CalendarOverlay.java
@@ -34,6 +34,8 @@ import net.minecraftforge.fml.common.gameevent.TickEvent;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL14;
+
import static io.github.moulberry.notenoughupdates.GuiTextures.*;
import java.io.File;
@@ -92,6 +94,10 @@ public class CalendarOverlay {
private int jfFavouriteSelectX = 0;
private int jfFavouriteSelectY = 0;
+ private boolean drawTimerForeground = false;
+
+ private static long spookyStart = 0;
+
private static long SECOND = 1000;
private static long MINUTE = SECOND*60;
private static long HOUR = MINUTE*60;
@@ -649,7 +655,7 @@ public class CalendarOverlay {
}
@SubscribeEvent(priority = EventPriority.LOW)
- public void onGuiDraw(RenderGameOverlayEvent event) {
+ public void onGuiDraw(RenderGameOverlayEvent.Post event) {
if(NotEnoughUpdates.INSTANCE.manager.config.eventNotifications.value &&
event.type == RenderGameOverlayEvent.ElementType.ALL) {
GlStateManager.pushMatrix();
@@ -714,6 +720,15 @@ public class CalendarOverlay {
return false;
}
+ long currentTime = System.currentTimeMillis();
+ if(currentTime - spookyStart < HOUR && NotEnoughUpdates.INSTANCE.manager.config.spookyMorningNotification.value) {
+ long delta = (currentTime - SKYBLOCK_START) % (20*MINUTE) - 7*50*SECOND - 10*SECOND;
+ if(delta < 500 && delta > -8500) {
+ event = new SBEvent("spooky_festival_7am", "Spooky Festival 7am", new ItemStack(Items.bone), null);
+ timeUntil = delta;
+ }
+ }
+
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft());
int width = scaledResolution.getScaledWidth();
@@ -778,7 +793,23 @@ public class CalendarOverlay {
}
@SubscribeEvent
- public void onGuiDraw(GuiScreenEvent.DrawScreenEvent.Post event) {
+ public void onGuiScreenDrawTimer(GuiScreenEvent.BackgroundDrawnEvent event) {
+ blurBackground();
+ if(!drawTimerForeground) {
+ drawTimer();
+ }
+ GlStateManager.color(1, 1, 1, 1);
+ GlStateManager.enableBlend();
+ }
+
+ @SubscribeEvent
+ public void onGuiScreenDrawTimer(GuiScreenEvent.DrawScreenEvent.Post event) {
+ if(drawTimerForeground) {
+ drawTimer();
+ }
+ }
+
+ public void drawTimer() {
GlStateManager.pushMatrix();
GlStateManager.translate(0, 0, 10);
if(Minecraft.getMinecraft().currentScreen instanceof GuiContainer && NotEnoughUpdates.INSTANCE.isOnSkyblock()) {
@@ -816,6 +847,12 @@ public class CalendarOverlay {
continue;
}
+ if(sbEvent.id.equals("spooky_festival")) {
+ if(currentTime - spookyStart > HOUR || (sbEvents.getKey() > currentTime && sbEvents.getKey() < spookyStart)) {
+ spookyStart = sbEvents.getKey();
+ }
+ }
+
if(nextMajorEvent == null && !sbEvent.id.split(":")[0].equals("jacob_farming") &&
!sbEvent.id.equals("dark_auction")) {
nextMajorEvent = sbEvent;
@@ -865,7 +902,11 @@ public class CalendarOverlay {
List<String> tooltipToDisplay = null;
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
- blurBackground();
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ GlStateManager.disableFog();
+ GlStateManager.disableLighting();
+ GlStateManager.disableColorMaterial();
+
renderBlurredBackground(width, height, guiLeft+3, guiTop+3, xSize-6, ySize-6);
Minecraft.getMinecraft().getTextureManager().bindTexture(DISPLAYBAR);
@@ -934,8 +975,12 @@ public class CalendarOverlay {
}
}
+ drawTimerForeground = false;
if(tooltipToDisplay != null) {
+ drawTimerForeground = true;
+ GlStateManager.translate(0, 0, 100);
Utils.drawHoveringText(tooltipToDisplay, mouseX, Math.max(17, mouseY), width, height, -1, fr);
+ GlStateManager.translate(0, 0, -100);
}
}
}
@@ -980,7 +1025,6 @@ public class CalendarOverlay {
Utils.drawGradientRect(0, 0, width, height, -1072689136, -804253680);
- blurBackground();
renderBlurredBackground(width, height, guiLeft+3, guiTop+3, 162, 14);
renderBlurredBackground(width, height, guiLeft+3, guiTop+26, 14, 141);
renderBlurredBackground(width, height, guiLeft+151, guiTop+26, 14, 141);
@@ -1045,6 +1089,12 @@ public class CalendarOverlay {
int x = guiLeft+29+17*(index%3);
int y = guiTop+44+17*(index/3);
+ if(sbEvent.id.equals("spooky_festival")) {
+ if(currentTime - spookyStart > HOUR || (sbEvents.getKey() > currentTime && sbEvents.getKey() < spookyStart)) {
+ spookyStart = sbEvents.getKey();
+ }
+ }
+
if(index >= 21) {
if(nextEvent != null) break;
if(eventFavourites.isEmpty()) {
@@ -1405,10 +1455,12 @@ public class CalendarOverlay {
float vMin = (height-y)/(float)height;
float vMax = (height-y-blurHeight)/(float)height;
+ GlStateManager.depthMask(false);
blurOutputVert.bindFramebufferTexture();
GlStateManager.color(1f, 1f, 1f, 1f);
Utils.drawTexturedRect(x, y, blurWidth, blurHeight, uMin, uMax, vMin, vMax);
blurOutputVert.unbindFramebufferTexture();
+ GlStateManager.depthMask(true);
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
index 9f33df1a..e4ec49cb 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
@@ -88,14 +88,14 @@ public class NEUEventListener {
String version = o.get("version").getAsString();
- if(!neu.VERSION.equalsIgnoreCase(version)) {
+ boolean shouldUpdate = !NotEnoughUpdates.VERSION.equalsIgnoreCase(version);
+ if(o.has("version_id") && o.get("version_id").isJsonPrimitive()) {
+ int version_id = o.get("version_id").getAsInt();
+ shouldUpdate = version_id > NotEnoughUpdates.VERSION_ID;
+ }
+
+ if(shouldUpdate) {
String update_msg = o.get("update_msg").getAsString();
- String discord_link = o.get("discord_link").getAsString();
- String youtube_link = o.get("youtube_link").getAsString();
- String update_link = o.get("update_link").getAsString();
- String github_link = o.get("github_link").getAsString();
- String other_text = o.get("other_text").getAsString();
- String other_link = o.get("other_link").getAsString();
int first_len = -1;
for(String line : update_msg.split("\n")) {
@@ -119,7 +119,6 @@ public class NEUEventListener {
neu.displayLinks(o);
Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(""));
-
}
} catch(Exception ignored) {}
}
@@ -722,7 +721,7 @@ public class NEUEventListener {
Minecraft.getMinecraft().getTextureManager().bindTexture(dungeon_chest_worth);
GL11.glColor4f(1, 1, 1, 1);
GlStateManager.disableLighting();
- Utils.drawTexturedRect(guiLeft+xSize+4, guiTop, 180, 71, 0, 180/256f, 0, 71/256f, GL11.GL_NEAREST);
+ Utils.drawTexturedRect(guiLeft+xSize+4, guiTop, 180, 101, 0, 180/256f, 0, 101/256f, GL11.GL_NEAREST);
int chestCost = 0;
String line6 = Utils.cleanColour(neu.manager.getLoreFromNBT(rewardChest.getTagCompound())[6]);
@@ -737,8 +736,11 @@ public class NEUEventListener {
chestCost = Integer.parseInt(cost.toString());
}
- boolean missing = false;
+ String missingItemBIN = null;
+ String missingItemABIN = null;
+ String missingItemAUC = null;
int totalValueBIN = 0;
+ int totalValueABIN = 0;
int totalValueAUC = 0;
for(int i=0; i<5; i++) {
ItemStack item = lower.getStackInSlot(11+i);
@@ -750,86 +752,119 @@ public class NEUEventListener {
bazaarPrice = bazaarInfo.get("avg_sell").getAsFloat();
}
- float worthBIN = -1;
+ float worthBIN;
+ float worthABIN;
float worthAUC = -1;
if(bazaarPrice > 0) {
worthBIN = bazaarPrice;
+ worthABIN = bazaarPrice;
worthAUC = bazaarPrice;
} else {
- worthBIN = neu.manager.auctionManager.getItemAvgBin(internal);
- if(worthBIN <= 0) {
- worthBIN = neu.manager.auctionManager.getLowestBin(internal);
- }
+ worthABIN = neu.manager.auctionManager.getItemAvgBin(internal);
+ worthBIN = neu.manager.auctionManager.getLowestBin(internal);
+
JsonObject aucInfo = neu.manager.auctionManager.getItemAuctionInfo(internal);
if(aucInfo != null) {
worthAUC = aucInfo.get("price").getAsFloat();
}
}
- if(worthAUC <= 0 && worthBIN <= 0) {
- missing = true;
- break;
- }
-
if(worthBIN > 0 && totalValueBIN >= 0) {
totalValueBIN += worthBIN;
} else {
+ if(totalValueBIN != -1) {
+ missingItemBIN = internal;
+ }
totalValueBIN = -1;
}
+ if(worthABIN > 0 && totalValueABIN >= 0) {
+ totalValueABIN += worthABIN;
+ } else {
+ if(totalValueABIN != -1) {
+ missingItemABIN = internal;
+ }
+ totalValueABIN = -1;
+ }
+
if(worthAUC > 0 && totalValueAUC >= 0) {
totalValueAUC += worthAUC;
} else {
+ if(totalValueAUC != -1) {
+ missingItemAUC = internal;
+ }
totalValueAUC = -1;
}
}
}
- if(totalValueAUC <= 0 && totalValueBIN <= 0) {
- missing = true;
- }
- if(missing) {
- drawStringShadow(EnumChatFormatting.BLUE+"Couldn't find item on AH. Item is very rare!",
- guiLeft+xSize+4+90, guiTop+14, 170);
- } else {
- NumberFormat format = NumberFormat.getInstance(Locale.US);
- String valueStringBIN = EnumChatFormatting.YELLOW+"Value (BIN): " + EnumChatFormatting.GOLD
+ NumberFormat format = NumberFormat.getInstance(Locale.US);
+ String valueStringBIN;
+ String valueStringABIN;
+ String valueStringAUC;
+ if(totalValueBIN >= 0) {
+ valueStringBIN = EnumChatFormatting.YELLOW+"Value (BIN): " + EnumChatFormatting.GOLD
+ EnumChatFormatting.BOLD + format.format(totalValueBIN) + " coins";
- String valueStringAUC = EnumChatFormatting.YELLOW+"Value (AUC): " + EnumChatFormatting.GOLD
+ } else {
+ valueStringBIN = EnumChatFormatting.YELLOW+"Can't find BIN: " + missingItemBIN;
+ }
+ if(totalValueABIN >= 0) {
+ valueStringABIN = EnumChatFormatting.YELLOW+"Value (AVG BIN): " + EnumChatFormatting.GOLD
+ + EnumChatFormatting.BOLD + format.format(totalValueABIN) + " coins";
+ } else {
+ valueStringABIN = EnumChatFormatting.YELLOW+"Can't find AVG BIN: " + missingItemABIN;
+ }
+ if(totalValueAUC >= 0) {
+ valueStringAUC = EnumChatFormatting.YELLOW+"Value (AUC): " + EnumChatFormatting.GOLD
+ EnumChatFormatting.BOLD + format.format(totalValueAUC) + " coins";
+ } else {
+ valueStringAUC = EnumChatFormatting.YELLOW+"Can't find AUC: " + missingItemAUC;
+ }
+ String profitPrefix = EnumChatFormatting.YELLOW+"Profit/Loss: " + EnumChatFormatting.DARK_GREEN
+ + EnumChatFormatting.BOLD + "+";
+ String lossPrefix = EnumChatFormatting.YELLOW+"Profit/Loss: " + EnumChatFormatting.RED
+ + EnumChatFormatting.BOLD + "-";
- int profitLossBIN = totalValueBIN - chestCost;
- String plStringBIN;
- if(profitLossBIN >= 0) {
- plStringBIN = EnumChatFormatting.YELLOW+"Profit/Loss: " + EnumChatFormatting.DARK_GREEN
- + EnumChatFormatting.BOLD + "+" + format.format(profitLossBIN) + " coins";
- } else {
- plStringBIN = EnumChatFormatting.YELLOW+"Profit/Loss: " + EnumChatFormatting.RED
- + EnumChatFormatting.BOLD + "-" + format.format(-profitLossBIN) + " coins";
- }
-
- int profitLossAUC = totalValueAUC - chestCost;
- String plStringAUC;
- if(profitLossAUC >= 0) {
- plStringAUC = EnumChatFormatting.YELLOW+"Profit/Loss: " + EnumChatFormatting.DARK_GREEN
- + EnumChatFormatting.BOLD + "+" + format.format(profitLossAUC) + " coins";
- } else {
- plStringAUC = EnumChatFormatting.YELLOW+"Profit/Loss: " + EnumChatFormatting.RED
- + EnumChatFormatting.BOLD + "-" + format.format(-profitLossAUC) + " coins";
- }
+ int profitLossBIN = totalValueBIN - chestCost;
+ String plStringBIN;
+ if(profitLossBIN >= 0) {
+ plStringBIN = profitPrefix + format.format(profitLossBIN) + " coins";
+ } else {
+ plStringBIN = lossPrefix + format.format(-profitLossBIN) + " coins";
+ }
- drawStringShadow(valueStringBIN, guiLeft+xSize+4+90,
- guiTop+14, 170);
- drawStringShadow(plStringBIN, guiLeft+xSize+4+90,
- guiTop+26, 170);
+ int profitLossABIN = totalValueABIN - chestCost;
+ String plStringABIN;
+ if(profitLossABIN >= 0) {
+ plStringABIN = profitPrefix + format.format(profitLossABIN) + " coins";
+ } else {
+ plStringABIN = lossPrefix + format.format(-profitLossABIN) + " coins";
+ }
- drawStringShadow(valueStringAUC, guiLeft+xSize+4+90,
- guiTop+44, 170);
- drawStringShadow(plStringAUC, guiLeft+xSize+4+90,
- guiTop+56, 170);
+ int profitLossAUC = totalValueAUC - chestCost;
+ String plStringAUC;
+ if(profitLossAUC >= 0) {
+ plStringAUC = profitPrefix + format.format(profitLossAUC) + " coins";
+ } else {
+ plStringAUC = lossPrefix + format.format(-profitLossAUC) + " coins";
}
+
+ drawStringShadow(valueStringBIN, guiLeft+xSize+4+90,
+ guiTop+14, 170);
+ if(totalValueBIN >= 0) drawStringShadow(plStringBIN, guiLeft+xSize+4+90,
+ guiTop+26, 170);
+
+ drawStringShadow(valueStringABIN, guiLeft+xSize+4+90,
+ guiTop+44, 170);
+ if(totalValueABIN >= 0) drawStringShadow(plStringABIN, guiLeft+xSize+4+90,
+ guiTop+56, 170);
+
+ drawStringShadow(valueStringAUC, guiLeft+xSize+4+90,
+ guiTop+74, 170);
+ if(totalValueAUC >= 0) drawStringShadow(plStringAUC, guiLeft+xSize+4+90,
+ guiTop+86, 170);
}
} catch(Exception e) {
e.printStackTrace();
@@ -1383,8 +1418,11 @@ public class NEUEventListener {
chestCost = Integer.parseInt(cost.toString());
}
- boolean missing = false;
+ String missingItemBIN = null;
+ String missingItemABIN = null;
+ String missingItemAUC = null;
int totalValueBIN = 0;
+ int totalValueABIN = 0;
int totalValueAUC = 0;
for(int i=0; i<5; i++) {
ItemStack item = lower.getStackInSlot(11+i);
@@ -1396,81 +1434,113 @@ public class NEUEventListener {
bazaarPrice = bazaarInfo.get("avg_sell").getAsFloat();
}
- float worthBIN = -1;
+ float worthBIN;
+ float worthABIN;
float worthAUC = -1;
if(bazaarPrice > 0) {
worthBIN = bazaarPrice;
+ worthABIN = bazaarPrice;
worthAUC = bazaarPrice;
} else {
- worthBIN = neu.manager.auctionManager.getItemAvgBin(internal);
- if(worthBIN <= 0) {
- worthBIN = neu.manager.auctionManager.getLowestBin(internal);
- }
+ worthABIN = neu.manager.auctionManager.getItemAvgBin(internal);
+ worthBIN = neu.manager.auctionManager.getLowestBin(internal);
+
JsonObject aucInfo = neu.manager.auctionManager.getItemAuctionInfo(internal);
if(aucInfo != null) {
worthAUC = aucInfo.get("price").getAsFloat();
}
}
- if(worthAUC <= 0 && worthBIN <= 0) {
- missing = true;
- break;
- }
-
if(worthBIN > 0 && totalValueBIN >= 0) {
totalValueBIN += worthBIN;
} else {
+ if(totalValueBIN != -1) {
+ missingItemBIN = internal;
+ }
totalValueBIN = -1;
}
+ if(worthABIN > 0 && totalValueABIN >= 0) {
+ totalValueABIN += worthABIN;
+ } else {
+ if(totalValueABIN != -1) {
+ missingItemABIN = internal;
+ }
+ totalValueABIN = -1;
+ }
+
if(worthAUC > 0 && totalValueAUC >= 0) {
totalValueAUC += worthAUC;
} else {
+ if(totalValueAUC != -1) {
+ missingItemAUC = internal;
+ }
totalValueAUC = -1;
}
}
}
- if(totalValueAUC <= 0 && totalValueBIN <= 0) {
- missing = true;
- }
- String neu = EnumChatFormatting.YELLOW + "[NEU] ";
- if(missing) {
- newTooltip.add(neu + EnumChatFormatting.BLUE+"Couldn't find item on AH. Item is very rare!");
- } else {
- NumberFormat format = NumberFormat.getInstance(Locale.US);
- String valueStringBIN = EnumChatFormatting.YELLOW+"Value (BIN): " + EnumChatFormatting.GOLD
+ NumberFormat format = NumberFormat.getInstance(Locale.US);
+ String valueStringBIN;
+ String valueStringABIN;
+ String valueStringAUC;
+ if(totalValueBIN >= 0) {
+ valueStringBIN = EnumChatFormatting.YELLOW+"Value (BIN): " + EnumChatFormatting.GOLD
+ EnumChatFormatting.BOLD + format.format(totalValueBIN) + " coins";
- String valueStringAUC = EnumChatFormatting.YELLOW+"Value (AUC): " + EnumChatFormatting.GOLD
+ } else {
+ valueStringBIN = EnumChatFormatting.YELLOW+"Can't find BIN: " + missingItemBIN;
+ }
+ if(totalValueABIN >= 0) {
+ valueStringABIN = EnumChatFormatting.YELLOW+"Value (AVG BIN): " + EnumChatFormatting.GOLD
+ + EnumChatFormatting.BOLD + format.format(totalValueABIN) + " coins";
+ } else {
+ valueStringABIN = EnumChatFormatting.YELLOW+"Can't find AVG BIN: " + missingItemABIN;
+ }
+ if(totalValueAUC >= 0) {
+ valueStringAUC = EnumChatFormatting.YELLOW+"Value (AUC): " + EnumChatFormatting.GOLD
+ EnumChatFormatting.BOLD + format.format(totalValueAUC) + " coins";
+ } else {
+ valueStringAUC = EnumChatFormatting.YELLOW+"Can't find AUC: " + missingItemAUC;
+ }
+ String profitPrefix = EnumChatFormatting.YELLOW+"Profit/Loss: " + EnumChatFormatting.DARK_GREEN
+ + EnumChatFormatting.BOLD + "+";
+ String lossPrefix = EnumChatFormatting.YELLOW+"Profit/Loss: " + EnumChatFormatting.RED
+ + EnumChatFormatting.BOLD + "-";
- int profitLossBIN = totalValueBIN - chestCost;
- String plStringBIN;
- if(profitLossBIN >= 0) {
- plStringBIN = EnumChatFormatting.YELLOW+"Profit/Loss: " + EnumChatFormatting.DARK_GREEN
- + EnumChatFormatting.BOLD + "+" + format.format(profitLossBIN) + " coins";
- } else {
- plStringBIN = EnumChatFormatting.YELLOW+"Profit/Loss: " + EnumChatFormatting.RED
- + EnumChatFormatting.BOLD + "-" + format.format(-profitLossBIN) + " coins";
- }
+ int profitLossBIN = totalValueBIN - chestCost;
+ String plStringBIN;
+ if(profitLossBIN >= 0) {
+ plStringBIN = profitPrefix + format.format(profitLossBIN) + " coins";
+ } else {
+ plStringBIN = lossPrefix + format.format(-profitLossBIN) + " coins";
+ }
- int profitLossAUC = totalValueAUC - chestCost;
- String plStringAUC;
- if(profitLossAUC >= 0) {
- plStringAUC = EnumChatFormatting.YELLOW+"Profit/Loss: " + EnumChatFormatting.DARK_GREEN
- + EnumChatFormatting.BOLD + "+" + format.format(profitLossAUC) + " coins";
- } else {
- plStringAUC = EnumChatFormatting.YELLOW+"Profit/Loss: " + EnumChatFormatting.RED
- + EnumChatFormatting.BOLD + "-" + format.format(-profitLossAUC) + " coins";
- }
+ int profitLossABIN = totalValueABIN - chestCost;
+ String plStringABIN;
+ if(profitLossABIN >= 0) {
+ plStringABIN = profitPrefix + format.format(profitLossABIN) + " coins";
+ } else {
+ plStringABIN = lossPrefix + format.format(-profitLossABIN) + " coins";
+ }
- newTooltip.add(neu + valueStringBIN);
- newTooltip.add(neu + plStringBIN);
- newTooltip.add(neu + valueStringAUC);
- newTooltip.add(neu + plStringAUC);
+ int profitLossAUC = totalValueAUC - chestCost;
+ String plStringAUC;
+ if(profitLossAUC >= 0) {
+ plStringAUC = profitPrefix + format.format(profitLossAUC) + " coins";
+ } else {
+ plStringAUC = lossPrefix + format.format(-profitLossAUC) + " coins";
}
+
+ String neu = EnumChatFormatting.YELLOW + "[NEU] ";
+
+ newTooltip.add(neu + valueStringBIN);
+ if(totalValueBIN >= 0) newTooltip.add(neu + plStringBIN);
+ newTooltip.add(neu + valueStringABIN);
+ if(totalValueABIN >= 0) newTooltip.add(neu + plStringABIN);
+ newTooltip.add(neu + valueStringAUC);
+ if(totalValueAUC >= 0) newTooltip.add(neu + plStringAUC);
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
index 08d6c50b..7fc519a8 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
@@ -50,6 +50,9 @@ import java.lang.reflect.Method;
import java.text.NumberFormat;
import java.util.List;
import java.util.*;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
@@ -369,11 +372,10 @@ public class NEUOverlay extends Gui {
String command = quickCommandStr.split(":")[0].trim();
if(command.startsWith("/")) {
NotEnoughUpdates.INSTANCE.sendChatMessage(command);
- Utils.playPressSound();
} else {
- ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/"+command); //Need to add '/' because of sk1er's patcher being unbelievably shit
- Utils.playPressSound();
+ ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/"+command);
}
+ Utils.playPressSound();
}
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
index 1894023b..fefa6ec0 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
@@ -79,7 +79,8 @@ import java.util.regex.Pattern;
@Mod(modid = NotEnoughUpdates.MODID, version = NotEnoughUpdates.VERSION, clientSideOnly = true)
public class NotEnoughUpdates {
public static final String MODID = "notenoughupdates";
- public static final String VERSION = "1.7-REL";
+ public static final String VERSION = "1.7.1-REL";
+ public static final int VERSION_ID = 10701;
public static NotEnoughUpdates INSTANCE = null;
@@ -930,7 +931,7 @@ public class NotEnoughUpdates {
JOptionPane.showConfirmDialog(null,
pf,
"Enter password:",
- JOptionPane.NO_OPTION,
+ JOptionPane.DEFAULT_OPTION,
JOptionPane.PLAIN_MESSAGE);
auth.setPassword(new String(pf.getPassword()));
System.out.print("Attempting login...");
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java b/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java
index e2cc82bd..242ad2af 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java
@@ -663,7 +663,7 @@ public class APIManager {
auctionPricesJson = jsonObject;
lastAuctionAvgUpdate = System.currentTimeMillis();
}, () -> {});
- manager.hypixelApi.getMyApiGZIPAsync("auction_averages_lbin/3day.json.gz", (jsonObject) -> {
+ manager.hypixelApi.getMyApiGZIPAsync("auction_averages_lbin/1day.json.gz", (jsonObject) -> {
auctionPricesAvgLowestBinJson = jsonObject;
}, () -> {});
}
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 fb9af536..4a209cd9 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java
@@ -216,7 +216,11 @@ public class DungeonMap {
GlStateManager.rotate(-rotation+180, 0, 0, 1);
}
+ GlStateManager.pushMatrix();
+ GlStateManager.scale(NotEnoughUpdates.INSTANCE.manager.config.dmIconScale.value,
+ NotEnoughUpdates.INSTANCE.manager.config.dmIconScale.value, 1);
Utils.drawTexturedRect(-5, -5, 10, 10, GL11.GL_NEAREST);
+ GlStateManager.popMatrix();
if(!NotEnoughUpdates.INSTANCE.manager.config.dmOrientCheck.value) {
GlStateManager.rotate(rotation-180, 0, 0, 1);
@@ -649,6 +653,7 @@ public class DungeonMap {
}
}
+ boolean blackBorder = false;
boolean headLayer = false;
int pixelWidth = 8;
int pixelHeight = 8;