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/CustomItems.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java30
-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.java7
-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.java5
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CalculatorCommand.java16
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/profile/PeekCommand.java48
-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/itemeditor/NEUItemEditor.java4
-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.java347
-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/CustomItemEffects.java98
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java5
-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.java11
-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/ItemOverlays.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/BasicPage.java760
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BingoPage.java95
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CollectionsPage.java (renamed from src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CollectionPage.java)291
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/DungeonPage.java816
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ExtraPage.java505
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java4685
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewerPage.java53
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/InventoriesPage.java778
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MiningPage.java1424
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/Panorama.java43
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/PetsPage.java575
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/PlayerStats.java351
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java1065
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/bestiary/BestiaryData.java326
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/bestiary/BestiaryPage.java190
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/trophy/TrophyFish.java21
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/trophy/TrophyFishPage.java (renamed from src/main/java/io/github/moulberry/notenoughupdates/profileviewer/trophy/TrophyFishingPage.java)193
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/lily/LilyDungeonsWeight.java148
-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.java92
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/lily/LilyWeight.java50
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/senither/SenitherDungeonsWeight.java66
-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.java67
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/senither/SenitherWeight.java51
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/weight/DungeonsWeight.java42
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/weight/SkillsWeight.java42
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/weight/SlayerWeight.java40
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/weight/weight/Weight.java70
-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.java26
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/XPInformation.java10
63 files changed, 8527 insertions, 5882 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java b/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java
index 06321b53..3911396f 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java
@@ -110,11 +110,11 @@ public class CustomItems {
* SHAAAAAAAAAAAAAAAAAAME
*/
- private static JsonObject create(String internalname, String itemid, String displayname, String... lore) {
+ private static JsonObject create(String internalname, String itemid, String displayName, String... lore) {
JsonObject json = new JsonObject();
json.addProperty("itemid", itemid);
json.addProperty("internalname", internalname);
- json.addProperty("displayname", EnumChatFormatting.RED + displayname);
+ json.addProperty("displayname", EnumChatFormatting.RED + displayName);
JsonArray jsonlore = new JsonArray();
for (String line : lore) {
jsonlore.add(new JsonPrimitive(EnumChatFormatting.GRAY + line));
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
index fddb56d6..4e5c5b7d 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
@@ -207,7 +207,7 @@ public class NEUManager {
}
public CompletableFuture<Boolean> fetchRepository() {
- return CompletableFuture.<Boolean>supplyAsync(() -> {
+ return CompletableFuture.supplyAsync(() -> {
try {
JsonObject currentCommitJSON = getJsonFromFile(new File(configLocation, "currentCommit.json"));
@@ -782,14 +782,14 @@ public class NEUManager {
if (itemMc != null) {
itemid = itemMc.getRegistryName();
}
- String displayname = display.getString("Name");
+ String displayName = display.getString("Name");
String[] info = new String[0];
String clickcommand = "";
JsonObject item = new JsonObject();
item.addProperty("internalname", internalname);
item.addProperty("itemid", itemid);
- item.addProperty("displayname", displayname);
+ item.addProperty("displayname", displayName);
if (tag != null && tag.hasKey("ExtraAttributes", 10)) {
NBTTagCompound ea = tag.getCompoundTag("ExtraAttributes");
@@ -1110,7 +1110,7 @@ public class NEUManager {
* json files representing skyblock item data.
*/
public JsonObject createItemJson(
- String internalname, String itemid, String displayname, String[] lore,
+ String internalname, String itemid, String displayName, String[] lore,
String crafttext, String infoType, String[] info,
String clickcommand, int damage, NBTTagCompound nbttag
) {
@@ -1118,7 +1118,7 @@ public class NEUManager {
new JsonObject(),
internalname,
itemid,
- displayname,
+ displayName,
lore,
crafttext,
infoType,
@@ -1130,7 +1130,7 @@ public class NEUManager {
}
public JsonObject createItemJson(
- JsonObject base, String internalname, String itemid, String displayname, String[] lore,
+ JsonObject base, String internalname, String itemid, String displayName, String[] lore,
String crafttext, String infoType, String[] info,
String clickcommand, int damage, NBTTagCompound nbttag
) {
@@ -1141,7 +1141,7 @@ public class NEUManager {
JsonObject json = gson.fromJson(gson.toJson(base, JsonObject.class), JsonObject.class);
json.addProperty("internalname", internalname);
json.addProperty("itemid", itemid);
- json.addProperty("displayname", displayname);
+ json.addProperty("displayname", displayName);
json.addProperty("crafttext", crafttext);
json.addProperty("clickcommand", clickcommand);
json.addProperty("damage", damage);
@@ -1167,14 +1167,14 @@ public class NEUManager {
}
public boolean writeItemJson(
- String internalname, String itemid, String displayname, String[] lore, String crafttext,
+ String internalname, String itemid, String displayName, String[] lore, String crafttext,
String infoType, String[] info, String clickcommand, int damage, NBTTagCompound nbttag
) {
return writeItemJson(
new JsonObject(),
internalname,
itemid,
- displayname,
+ displayName,
lore,
crafttext,
infoType,
@@ -1186,14 +1186,14 @@ public class NEUManager {
}
public boolean writeItemJson(
- JsonObject base, String internalname, String itemid, String displayname, String[] lore,
+ JsonObject base, String internalname, String itemid, String displayName, String[] lore,
String crafttext, String infoType, String[] info, String clickcommand, int damage, NBTTagCompound nbttag
) {
JsonObject json = createItemJson(
base,
internalname,
itemid,
- displayname,
+ displayName,
lore,
crafttext,
infoType,
@@ -1486,11 +1486,11 @@ public class NEUManager {
if (useReplacements) {
replacements = getLoreReplacements(stack.getTagCompound(), -1);
- String displayname = json.get("displayname").getAsString();
+ String displayName = json.get("displayname").getAsString();
for (Map.Entry<String, String> entry : replacements.entrySet()) {
- displayname = displayname.replace("{" + entry.getKey() + "}", entry.getValue());
+ displayName = displayName.replace("{" + entry.getKey() + "}", entry.getValue());
}
- stack.setStackDisplayName(displayname);
+ stack.setStackDisplayName(displayName);
}
if (json.has("lore")) {
@@ -1519,7 +1519,7 @@ public class NEUManager {
return NotEnoughUpdates.INSTANCE.manager
.fetchRepository()
.thenCompose(ignored -> NotEnoughUpdates.INSTANCE.manager.reloadRepository())
- .<List<String>>thenApply(ignored -> {
+ .thenApply(ignored -> {
String newCommitHash = NotEnoughUpdates.INSTANCE.manager.latestRepoCommit;
String newCommitShortHash = (newCommitHash == null ? "MISSING" : newCommitHash.substring(0, 7));
return Arrays.asList(
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
index 377cf7d3..19f5a780 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 bca3d5d3..25f72fe9 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 = 20100;
- 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
*/
@@ -291,6 +292,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(navigation);
if (Minecraft.getMinecraft().getResourceManager() instanceof IReloadableResourceManager) {
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..3fc34d10 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;
@@ -409,6 +409,7 @@ public class APIManager {
int page = pagesToDownload.pop();
getPageFromAPI(page);
} catch (NoSuchElementException ignored) {
+ return;
} //Weird race condition?
}
}
@@ -540,7 +541,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());
}
}