aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-01-05 15:13:48 +0100
committerGitHub <noreply@github.com>2022-01-05 15:13:48 +0100
commit7d5e27e94e96b6d12543fd5041bf274b2758962f (patch)
treeca4ca9ce9daaa0ffb68273c1b8fc3888b0dfaa3d /src/main/java
parentd6adec7cc55640af48f10517318f73f7a9d8b579 (diff)
downloadNotEnoughUpdates-7d5e27e94e96b6d12543fd5041bf274b2758962f.tar.gz
NotEnoughUpdates-7d5e27e94e96b6d12543fd5041bf274b2758962f.tar.bz2
NotEnoughUpdates-7d5e27e94e96b6d12543fd5041bf274b2758962f.zip
Fix graph freaking out (#57)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiPriceGraph.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiPriceGraph.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiPriceGraph.java
index a063bafe..44d5b7ef 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiPriceGraph.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiPriceGraph.java
@@ -128,7 +128,7 @@ public class GuiPriceGraph extends GuiScreen {
for (Long time : dataPoints.get().keySet()) {
float price = dataPoints.isBz() ? i == 0 ? dataPoints.bz.get(time).b : dataPoints.bz.get(time).s : dataPoints.ah.get(time);
int xPos = (int) map(time, firstTime, lastTime, guiLeft + 17, guiLeft + 315);
- int yPos = (int) map(price, highestValue + 10, lowestValue - 10, guiTop + 35, guiTop + 198);
+ int yPos = (int) map(price, highestValue + 10d, lowestValue - 10d, guiTop + 35, guiTop + 198);
if (prevX != null) {
Minecraft.getMinecraft().getTextureManager().bindTexture(TEXTURE);
GlStateManager.color(1, 1, 1, 1);
@@ -186,8 +186,8 @@ public class GuiPriceGraph extends GuiScreen {
float price = dataPoints.isBz() ? dataPoints.bz.get(lowestDistTime).b : dataPoints.ah.get(lowestDistTime);
Float price2 = dataPoints.isBz() ? dataPoints.bz.get(lowestDistTime).s : null;
int xPos = (int) map(lowestDistTime, firstTime, lastTime, guiLeft + 17, guiLeft + 315);
- int yPos = (int) map(price, highestValue + 10, lowestValue - 10, guiTop + 35, guiTop + 198);
- int yPos2 = price2 != null ? (int) map(price2, highestValue + 10, lowestValue - 10, guiTop + 35, guiTop + 198) : 0;
+ int yPos = (int) map(price, highestValue + 10d, lowestValue - 10d, guiTop + 35, guiTop + 198);
+ int yPos2 = price2 != null ? (int) map(price2, highestValue + 10d, lowestValue - 10d, guiTop + 35, guiTop + 198) : 0;
Utils.drawLine(xPos, guiTop + 35, xPos, guiTop + 198, 2, 0x4D8b8b8b);
Minecraft.getMinecraft().getTextureManager().bindTexture(TEXTURE);