aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLorenz <lo.scherf@gmail.com>2022-08-10 15:46:52 +0200
committerLorenz <lo.scherf@gmail.com>2022-08-10 15:46:52 +0200
commit4181ad5f29c0a0476c160c0605d7a1c58a106067 (patch)
treefabdb7cc3223db1f4bd0c1dc1b1e76fed1f9b166 /src
parent28975d2a1e9f2ca6cac1a012f3b9d3d7d45adaf2 (diff)
parent4cf7ec9f8ee48b7ea22b2d514c3e7ff1be7daf0d (diff)
downloadNotEnoughUpdates-4181ad5f29c0a0476c160c0605d7a1c58a106067.tar.gz
NotEnoughUpdates-4181ad5f29c0a0476c160c0605d7a1c58a106067.tar.bz2
NotEnoughUpdates-4181ad5f29c0a0476c160c0605d7a1c58a106067.zip
Merge branch 'master' into minion_helper_2
# Conflicts: # src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java # src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java # src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java18
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java8
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java6
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java28
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java6
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CalculatorCommand.java16
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java44
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java10
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java328
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/AbiphoneWarning.java215
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/BazaarSacksProfit.java182
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java26
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiPriceGraph.java20
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/NeuSearchCalculator.java55
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/SignCalculator.java18
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java7
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Dungeons.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java9
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java12
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java8
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java79
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java26
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/lily/LilyDungeonsWeight.java145
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/lily/LilySkillsWeight.java101
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/lily/LilySlayerWeight.java91
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/lily/LilyWeight.java48
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/senither/SenitherDungeonsWeight.java80
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/senither/SenitherSkillsWeight.java66
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/senither/SenitherSlayerWeight.java66
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/senither/SenitherWeight.java50
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/weight/DungeonsWeight.java41
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/weight/SkillsWeight.java39
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/weight/SlayerWeight.java39
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/weight/Weight.java67
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/weight/WeightStruct.java54
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Constants.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/SkytilsCompat.java64
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java4
40 files changed, 1799 insertions, 289 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
index de050e5e..e51f118e 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
@@ -36,9 +36,11 @@ import io.github.moulberry.notenoughupdates.mbgui.MBAnchorPoint;
import io.github.moulberry.notenoughupdates.mbgui.MBGuiElement;
import io.github.moulberry.notenoughupdates.mbgui.MBGuiGroupAligned;
import io.github.moulberry.notenoughupdates.mbgui.MBGuiGroupFloating;
+import io.github.moulberry.notenoughupdates.miscfeatures.EnchantingSolvers;
import io.github.moulberry.notenoughupdates.miscfeatures.PetInfoOverlay;
import io.github.moulberry.notenoughupdates.miscfeatures.SunTzu;
import io.github.moulberry.notenoughupdates.miscgui.GuiPriceGraph;
+import io.github.moulberry.notenoughupdates.miscgui.NeuSearchCalculator;
import io.github.moulberry.notenoughupdates.options.NEUConfigEditor;
import io.github.moulberry.notenoughupdates.util.Constants;
import io.github.moulberry.notenoughupdates.util.GuiTextures;
@@ -377,7 +379,7 @@ public class NEUOverlay extends Gui {
}
//Search bar text
- fr.drawString(textField.getText(), (int) x + 5,
+ fr.drawString(NeuSearchCalculator.format(textField.getText()), (int) x + 5,
(int) y - 4 + getHeight() / 2, Color.WHITE.getRGB()
);
@@ -548,6 +550,7 @@ public class NEUOverlay extends Gui {
@Override
public void mouseClick(float x, float y, int mouseX, int mouseY) {
if (!NotEnoughUpdates.INSTANCE.config.toolbar.quickCommands) return;
+ if (EnchantingSolvers.disableButtons()) return;
if ((NotEnoughUpdates.INSTANCE.config.toolbar.quickCommandsClickType != 0 && Mouse.getEventButtonState()) ||
(NotEnoughUpdates.INSTANCE.config.toolbar.quickCommandsClickType == 0 && !Mouse.getEventButtonState() &&
@@ -570,6 +573,7 @@ public class NEUOverlay extends Gui {
@Override
public void render(float x, float y) {
if (!NotEnoughUpdates.INSTANCE.config.toolbar.quickCommands) return;
+ if (EnchantingSolvers.disableButtons()) return;
int paddingUnscaled = getPaddingUnscaled();
int bigItemSize = getSearchBarYSize();
@@ -1947,7 +1951,7 @@ public class NEUOverlay extends Gui {
if (textField.getText().toLowerCase().contains("lunar")) {
Minecraft.getMinecraft().getTextureManager().bindTexture(ATMOULBERRYWHYISMYLUNARCLIENTBUGGING);
GlStateManager.color(1, 1, 1, 1);
- GlStateManager.translate(0,0,100);
+ GlStateManager.translate(0, 0, 100);
Utils.drawTexturedRect((width + 410) / 2f, (height + 450) / 2f - 114, 113, 64, GL11.GL_LINEAR);
GlStateManager.bindTexture(0);
}
@@ -2379,10 +2383,10 @@ public class NEUOverlay extends Gui {
Utils.drawTexturedRect((float) ((width - 224.1) / 2f), yNumber, 31, 86, GL11.GL_NEAREST);
GlStateManager.bindTexture(0);
- Utils.drawItemStack(slot1, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105));
- Utils.drawItemStack(slot2, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105) + 18);
- Utils.drawItemStack(slot3, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105) + 36);
- Utils.drawItemStack(slot4, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105) + 54);
+ Utils.drawItemStack(slot1, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105), true);
+ Utils.drawItemStack(slot2, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105) + 18, true);
+ Utils.drawItemStack(slot3, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105) + 36, true);
+ Utils.drawItemStack(slot4, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105) + 54, true);
if (slot1 == null) {
Minecraft.getMinecraft().getTextureManager().bindTexture(QUESTION_MARK);
GlStateManager.color(1, 1, 1, 1);
@@ -2565,7 +2569,7 @@ public class NEUOverlay extends Gui {
Utils.drawTexturedRect((float) ((width - 224.1) / 2f), yNumber, 31, 32, GL11.GL_NEAREST);
GlStateManager.bindTexture(0);
- Utils.drawItemStack(petInfo, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105) + 72);
+ Utils.drawItemStack(petInfo, (int) ((width - 208) / 2f), (int) ((height + 60) / 2f - 105) + 72, true);
renderingPetHud = true;
List<String> tooltipToDisplay = null;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
index 37bf160f..c604fd86 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
@@ -34,6 +34,7 @@ import io.github.moulberry.notenoughupdates.listener.NEUEventListener;
import io.github.moulberry.notenoughupdates.listener.OldAnimationChecker;
import io.github.moulberry.notenoughupdates.listener.RenderListener;
import io.github.moulberry.notenoughupdates.miscfeatures.AuctionProfit;
+import io.github.moulberry.notenoughupdates.miscfeatures.BazaarSacksProfit;
import io.github.moulberry.notenoughupdates.miscfeatures.CrystalOverlay;
import io.github.moulberry.notenoughupdates.miscfeatures.CrystalWishingCompassSolver;
import io.github.moulberry.notenoughupdates.miscfeatures.CustomItemEffects;
@@ -111,9 +112,9 @@ import java.util.Set;
public class NotEnoughUpdates {
public static final String MODID = "notenoughupdates";
public static final String VERSION = "2.1.0-REL";
- public static final int VERSION_ID = 20200;
- public static final int PRE_VERSION_ID = 0;
- public static final int HOTFIX_VERSION_ID = 1;
+ public static final int VERSION_ID = 20000;
+ public static final int PRE_VERSION_ID = 1;
+ public static final int HOTFIX_VERSION_ID = 0;
/**
* Registers the biomes for the crystal hollows here so optifine knows they exists
*/
@@ -290,6 +291,7 @@ public class NotEnoughUpdates {
MinecraftForge.EVENT_BUS.register(new SignCalculator());
MinecraftForge.EVENT_BUS.register(TrophyRewardOverlay.getInstance());
MinecraftForge.EVENT_BUS.register(PowerStoneStatsDisplay.getInstance());
+ MinecraftForge.EVENT_BUS.register(BazaarSacksProfit.getInstance());
MinecraftForge.EVENT_BUS.register(MinionHelperManager.getInstance());
MinecraftForge.EVENT_BUS.register(navigation);
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 7c58cb4d..29b5f4a5 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java
@@ -123,7 +123,7 @@ public class APIManager {
public class Auction {
public String auctioneerUuid;
public long end;
- public int starting_bid;
+ public long starting_bid;
public int highest_bid_amount;
public int bid_count;
public boolean bin;
@@ -137,7 +137,7 @@ public class APIManager {
public int enchLevel = 0; //0 = clean, 1 = ench, 2 = ench/hpb
public Auction(
- String auctioneerUuid, long end, int starting_bid, int highest_bid_amount, int bid_count,
+ String auctioneerUuid, long end, long starting_bid, int highest_bid_amount, int bid_count,
boolean bin, String category, String rarity, int dungeonTier, String item_tag_str
) {
this.auctioneerUuid = auctioneerUuid;
@@ -540,7 +540,7 @@ public class APIManager {
String auctionUuid = auction.get("uuid").getAsString();
String auctioneerUuid = auction.get("auctioneer").getAsString();
long end = auction.get("end").getAsLong();
- int starting_bid = auction.get("starting_bid").getAsInt();
+ long starting_bid = auction.get("starting_bid").getAsLong();
int highest_bid_amount = auction.get("highest_bid_amount").getAsInt();
int bid_count = auction.get("bids").getAsJsonArray().size();
boolean bin = false;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java b/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java
index d8fedecb..f0ef1ec6 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java
@@ -94,7 +94,7 @@ public class CustomAH extends Gui {
private boolean shouldUpdateSearch = false;
private boolean shouldSortItems = false;
- private int startingBid = 0;
+ private long startingBid = 0;
private String currentAucId = null;
private int clickedMainCategory = -1;
@@ -640,7 +640,7 @@ public class CustomAH extends Gui {
}
}
if (priceNumbers.length() > 0) {
- startingBid = Integer.parseInt(priceNumbers.toString());
+ startingBid = Long.parseLong(priceNumbers.toString());
}
}
}
@@ -1578,18 +1578,18 @@ public class CustomAH extends Gui {
if (auc2 == null) return -1;
if (sortMode == SORT_MODE_HIGH) {
- int price1 = Math.max(auc1.highest_bid_amount, auc1.starting_bid);
- int price2 = Math.max(auc2.highest_bid_amount, auc2.starting_bid);
- int diff = price2 - price1;
+ long price1 = Math.max(auc1.highest_bid_amount, auc1.starting_bid);
+ long price2 = Math.max(auc2.highest_bid_amount, auc2.starting_bid);
+ long diff = price2 - price1;
if (diff != 0) {
- return diff;
+ return Long.compare(price2, price1);
}
} else if (sortMode == SORT_MODE_LOW) {
- int price1 = Math.max(auc1.highest_bid_amount, auc1.starting_bid);
- int price2 = Math.max(auc2.highest_bid_amount, auc2.starting_bid);
- int diff = price1 - price2;
+ long price1 = Math.max(auc1.highest_bid_amount, auc1.starting_bid);
+ long price2 = Math.max(auc2.highest_bid_amount, auc2.starting_bid);
+ long diff = price1 - price2;
if (diff != 0) {
- return diff;
+ return Long.compare(price1, price2);
}
} else {
long end1 = auc1.end;
@@ -1679,16 +1679,16 @@ public class CustomAH extends Gui {
priceField.setText((int) (priceI * factor) + end);
}
- private int getPriceFilterAmount() {
+ private long getPriceFilterAmount() {
return getNumberFromTextBox(priceFilterField);
}
- private int getNumberFromTextBox(GuiTextField textField) {
+ private long getNumberFromTextBox(GuiTextField textField) {
if (textField.getText().equals("")) {
return -2;
}
try {
- int parsed = Integer.parseInt(textField.getText());
+ long parsed = Long.parseLong(textField.getText());
if (parsed < 0) {
return -1;
}
@@ -1698,7 +1698,7 @@ public class CustomAH extends Gui {
}
}
- private int getBinPriceFilterAmount() {
+ private long getBinPriceFilterAmount() {
return getNumberFromTextBox(binPriceFilterField);
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java
index 807fcc27..3967edb4 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java
@@ -51,12 +51,6 @@ public class MapCommand extends ClientCommandBase {
@Override
public void processCommand(ICommandSender sender, String[] args) throws CommandException {
- if (!NotEnoughUpdates.INSTANCE.config.hidden.dev) {
- Utils.addChatMessage(
- EnumChatFormatting.RED +
- "[NEU] The map does not work right now. You can use the map from other mods, for example: SkyblockAddons, DungeonsGuide or Skytils.");
- return;
- }
if (NotEnoughUpdates.INSTANCE.colourMap == null) {
try (
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CalculatorCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CalculatorCommand.java
index e6472d04..916ce072 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CalculatorCommand.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CalculatorCommand.java
@@ -47,20 +47,20 @@ public class CalculatorCommand extends ClientCommandBase {
if ((args.length == 1 && Objects.equals(args[0], "help")) || args.length == 0) {
sender.addChatMessage(new ChatComponentText(
"\n§e[NEU] §5It's a calculator.\n" +
- "§eFor Example §b/neucalc 3m*7k§e.\n" +
- "§eYou can also use suffixes (k, m, b, t, s)§e.\n" +
- "§eThe \"s\" suffix acts as 64.\n" +
- "§eTurn on Sign Calculator in /neu misc to also support this in sign popups.\n"));
+ "§eFor Example §b/neucalc 3m*7k§e.\n" +
+ "§eYou can also use suffixes (k, m, b, t, s)§e.\n" +
+ "§eThe \"s\" suffix acts as 64.\n" +
+ "§eTurn on Sign Calculator in /neu misc to also support this in sign popups.\n"));
return;
}
String source = String.join(" ", args);
try {
BigDecimal calculate = Calculator.calculate(source);
- DecimalFormat formatter = new DecimalFormat("#,###.00");
- String lr = formatter.format(calculate);
+ DecimalFormat formatter = new DecimalFormat("#,##0.##");
+ String format = formatter.format(calculate);
sender.addChatMessage(new ChatComponentText(
- EnumChatFormatting.YELLOW + "[NEU] " + EnumChatFormatting.WHITE + source + " = " + EnumChatFormatting.GREEN +
- lr
+ EnumChatFormatting.YELLOW + "[NEU] " + EnumChatFormatting.WHITE + source + " " + EnumChatFormatting.YELLOW +
+ "= " + EnumChatFormatting.GREEN + format
));
} catch (Calculator.CalculatorException e) {
sender.addChatMessage(new ChatComponentText(
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 2693341a..d4a728be 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java
@@ -65,13 +65,8 @@ import java.awt.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Set;
+import java.util.*;
public class DungeonMap {
private static final ResourceLocation GREEN_CHECK = new ResourceLocation(
@@ -602,8 +597,8 @@ public class DungeonMap {
GlStateManager.rotate(-rotation + 180, 0, 0, 1);
if (NotEnoughUpdates.INSTANCE.config.dungeonMap.dmCenterPlayer && playerPos != null) {
- float x = playerPos.getRenderX(0);
- float y = playerPos.getRenderY(0);
+ float x = playerPos.getRenderX();
+ float y = playerPos.getRenderY();
x -= minRoomX * (renderRoomSize + renderConnSize);
y -= minRoomY * (renderRoomSize + renderConnSize);
@@ -672,8 +667,8 @@ public class DungeonMap {
for (Map.Entry<String, MapPosition> entry : playerMarkerMapPositions.entrySet()) {
String name = entry.getKey();
MapPosition pos = entry.getValue();
- float x = pos.getRenderX(0);
- float y = pos.getRenderY(0);
+ float x = pos.getRenderX();
+ float y = pos.getRenderY();
float angle = pos.rotation;
boolean doInterp = NotEnoughUpdates.INSTANCE.config.dungeonMap.dmPlayerInterp;
@@ -681,8 +676,8 @@ public class DungeonMap {
MapPosition entityPos = playerEntityMapPositions.get(name);
angle = entityPos.rotation;
- float deltaX = entityPos.getRenderX(9) - pos.getRenderX(0);
- float deltaY = entityPos.getRenderY(9) - pos.getRenderY(0);
+ float deltaX = entityPos.getRenderX() - pos.getRenderX();
+ float deltaY = entityPos.getRenderY() - pos.getRenderY();
x += deltaX;
y += deltaY;
@@ -702,8 +697,8 @@ public class DungeonMap {
if (doInterp && playerMarkerMapPositionsLast.containsKey(name)) {
MapPosition last = playerMarkerMapPositionsLast.get(name);
- float xLast = last.getRenderX(0);
- float yLast = last.getRenderY(0);
+ float xLast = last.getRenderX();
+ float yLast = last.getRenderY();
float distSq = (x - xLast) * (x - xLast) + (y - yLast) * (y - yLast);
if (distSq < renderRoomSize * renderRoomSize / 4f) {
@@ -1100,12 +1095,12 @@ public class DungeonMap {
this.connOffsetY = connOffsetY;
}
- public float getRenderX(int blockOffset) {
- return (roomOffsetX + blockOffset) * getRenderRoomSize() + connOffsetX * getRenderConnSize();
+ public float getRenderX() {
+ return roomOffsetX * getRenderRoomSize() + connOffsetX * getRenderConnSize();
}
- public float getRenderY(int blockOffset) {
- return (roomOffsetY + blockOffset) * getRenderRoomSize() + connOffsetY * getRenderConnSize();
+ public float getRenderY() {
+ return roomOffsetY * getRenderRoomSize() + connOffsetY * getRenderConnSize();
}
@Override
@@ -1291,15 +1286,15 @@ public class DungeonMap {
if (entity instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) entity;
- float roomX = (float) player.posX / (roomSizeBlocks + 1);
- float roomY = (float) player.posZ / (roomSizeBlocks + 1);
+ float roomX = (float) (player.posX + 200) / (roomSizeBlocks + 1);
+ float roomY = (float) (player.posZ + 200) / (roomSizeBlocks + 1);
float playerRoomOffsetX = (float) Math.floor(roomX);
float playerConnOffsetX = (float) Math.floor(roomX);
float playerRoomOffsetY = (float) Math.floor(roomY);
float playerConnOffsetY = (float) Math.floor(roomY);
- float roomXInBlocks = (float) player.posX % (roomSizeBlocks + 1);
+ float roomXInBlocks = (float) (player.posX + 200) % (roomSizeBlocks + 1);
if (roomXInBlocks < 2) { //0,1
playerConnOffsetX -= 2 / 5f - roomXInBlocks / 5f;
} else if (roomXInBlocks > roomSizeBlocks - 2) { //31,30,29
@@ -1309,7 +1304,7 @@ public class DungeonMap {
playerRoomOffsetX += (roomXInBlocks - 2) / (roomSizeBlocks - 4);
}
- float roomYInBlocks = (float) player.posZ % (roomSizeBlocks + 1);
+ float roomYInBlocks = (float) (player.posZ + 200) % (roomSizeBlocks + 1);
if (roomYInBlocks < 2) { //0,1
playerConnOffsetY -= 2 / 5f - roomYInBlocks / 5f;
} else if (roomYInBlocks > roomSizeBlocks - 2) { //31,30,29
@@ -1438,8 +1433,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(0) - positions.get(i).getRenderX(0);
- float dy = entry.getValue().getRenderY(0) - positions.get(i).getRenderY(0);
+ float dx = entry.getValue().getRenderX() - positions.get(i).getRenderX();
+ float dy = entry.getValue().getRenderY() - positions.get(i).getRenderY();
deltaDists.put(i, dx * dx + dy * dy);
}
distanceMap.put(entry.getKey(), deltaDists);
@@ -1619,7 +1614,6 @@ public class DungeonMap {
if(player.getUniqueID().toString().charAt(14) == '4') {
actualPlayers.add(player.getName());
System.out.println(player.getName());
-
}
}*/
int players = 0;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java
index 47e85023..8ce9d505 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java
@@ -284,7 +284,7 @@ public class GuiDungeonMapEditor extends GuiScreen {
break;
case 8:
mapDesc = "Simple gray border";
- mapCredit = "TomEngMaster";
+ mapCredit = "Lucy";
break;
case 9:
mapDesc = "Viney wood border";
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java
index 379a0b6d..ea7f2f5b 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatL