diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-12-28 00:49:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-28 16:49:28 +1100 |
commit | ea3ec354ba3bb5b4ac64b8032816b8e4c407f099 (patch) | |
tree | 2a1b35a90a5b2e430ed8b09cfb0c6c8e28166039 | |
parent | 0aa264dd9df3205cf9641f052b6622fd36b811d5 (diff) | |
download | NotEnoughUpdates-ea3ec354ba3bb5b4ac64b8032816b8e4c407f099.tar.gz NotEnoughUpdates-ea3ec354ba3bb5b4ac64b8032816b8e4c407f099.tar.bz2 NotEnoughUpdates-ea3ec354ba3bb5b4ac64b8032816b8e4c407f099.zip |
more code clean up (#38)
208 files changed, 884 insertions, 1502 deletions
diff --git a/Update Notes/2.1.md b/Update Notes/2.1.md index 42457116..325ed5ae 100644 --- a/Update Notes/2.1.md +++ b/Update Notes/2.1.md @@ -56,12 +56,14 @@ - Fixed Mining overlay crash - Dokm - Fixed pet crash - Dokm - Fixed fetchur for the 75th time -- [Made a lil error if you have new tab list off](https://cdn.discordapp.com/attachments/896407218151366687/913681097605398528/unknown.png) +- [Made an error if you have new tab list off](https://cdn.discordapp.com/attachments/896407218151366687/913681097605398528/unknown.png) - Fixed lava fishing with the fishing alert +- Fixed /locraw detection, [previously allowed chat messages to trigger it](https://github.com/NotEnoughUpdates/NotEnoughUpdates/issues/35) - IRONM00N ### **Other** - New icons was added in storage_icons.png -- Moved the help icon in /neucustomize over a lil +- Moved the help icon in /neucustomize over a little - Added dg partner cape - Changed custom_enchant_gui.png to remove top right button +- Code Cleanup - IRONM00N ### **Previous change log** https://github.com/NotEnoughUpdates/NotEnoughUpdates/blob/master/Update%20Notes/2.0-Pre31-Release.md diff --git a/src/main/java/NotSkyblockAddonsInstallerFrame.java b/src/main/java/NotSkyblockAddonsInstallerFrame.java index 12431ae0..322555c8 100644 --- a/src/main/java/NotSkyblockAddonsInstallerFrame.java +++ b/src/main/java/NotSkyblockAddonsInstallerFrame.java @@ -16,7 +16,6 @@ import java.util.regex.Pattern; import java.util.zip.ZipEntry; public class NotSkyblockAddonsInstallerFrame extends JFrame implements ActionListener, MouseListener { - private static final Pattern IN_MODS_SUBFOLDER = Pattern.compile("1\\.8\\.9[/\\\\]?$"); private JLabel logo = null; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java b/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java index 5cadd856..f94a0633 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java @@ -7,8 +7,7 @@ import io.github.moulberry.notenoughupdates.util.Constants; import net.minecraft.util.EnumChatFormatting; public class CustomItems { - - /** + /* * So it has come to this, huh? Snooping through the source to find all my carefully crafted easter eggs. You * cheated not only the game, but yourself. You didn't grow. You didn't improve. You took a * shortcut and gained nothing. You experienced a hollow victory. Nothing was risked and nothing was gained. @@ -77,7 +76,7 @@ public class CustomItems { "We do a lil Chatting" ); - /** + /* * SHAAAAAAAAAAAAAAAAAAME */ diff --git a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java index 43689d3a..e7c55d77 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java @@ -46,8 +46,7 @@ public class ItemPriceInformation { //noinspection ResultOfMethodCallIgnored file.createNewFile(); writer.write(gson.toJson(items)); - } catch (IOException ignored) { - } + } catch (IOException ignored) {} } } @@ -304,5 +303,4 @@ public class ItemPriceInformation { return false; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java index db610720..341fe9ea 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java @@ -915,8 +915,6 @@ public class NEUEventListener { * <p> * All of this only matters if players are using gui scale auto which may result in the inventory being drawn * over the various panes. - * - * @param event */ @SubscribeEvent public void onGuiBackgroundDraw(GuiScreenEvent.BackgroundDrawnEvent event) { @@ -1121,8 +1119,6 @@ public class NEUEventListener { /** * Will draw the NEUOverlay over the inventory if focusInv == false. (z-translation of 300 is so that NEUOverlay * will draw over Items in the inventory (which render at a z value of about 250)) - * - * @param event */ @SubscribeEvent public void onGuiScreenDrawPost(GuiScreenEvent.DrawScreenEvent.Post event) { @@ -1258,8 +1254,7 @@ public class NEUEventListener { if (cost.length() > 0) { chestCost = Integer.parseInt(cost.toString()); } - } catch (Exception ignored) { - } + } catch (Exception ignored) {} String missingItem = null; int totalValue = 0; @@ -1428,8 +1423,6 @@ public class NEUEventListener { /** * Sends a mouse event to NEUOverlay if the inventory isn't hovered AND focused. * Will also cancel the event if if NEUOverlay#mouseInput returns true. - * - * @param event */ @SubscribeEvent(priority = EventPriority.LOW) public void onGuiScreenMouse(GuiScreenEvent.MouseInputEvent.Pre event) { @@ -2532,8 +2525,6 @@ public class NEUEventListener { /** * This makes it so that holding LCONTROL while hovering over an item with NBT will show the NBT of the item. - * - * @param event */ @SubscribeEvent public void onItemTooltip(ItemTooltipEvent event) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java index cb01206e..0f4e58bf 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java @@ -36,7 +36,6 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; public class NEUManager { - private final NotEnoughUpdates neu; public final Gson gson; public final APIManager auctionManager; @@ -305,8 +304,6 @@ public class NEUManager { /** * Loads the item in to the itemMap and also stores various words associated with this item * in to titleWordMap and loreWordMap. These maps are used in the searching algorithm. - * - * @param internalName */ public void loadItem(String internalName) { itemstackCache.remove(internalName); @@ -408,11 +405,10 @@ public class NEUManager { out: for (String s : query.split(" ")) { for (int i = 0; i < splitToSeach.length; i++) { - if (lastMatch == -1 || lastMatch == i - 1) { - if (splitToSeach[i].startsWith(s)) { - lastMatch = i; - continue out; - } + if (!(lastMatch == -1 || lastMatch == i - 1)) continue; + if (splitToSeach[i].startsWith(s)) { + lastMatch = i; + continue out; } } return false; @@ -599,27 +595,24 @@ public class NEUManager { for (String queryWord : query.split(" ")) { HashMap<String, List<Integer>> matchesToKeep = new HashMap<>(); for (HashMap<String, List<Integer>> wordMatches : subMapWithKeysThatAreSuffixes(queryWord, wordMap).values()) { - if (wordMatches != null && !wordMatches.isEmpty()) { - if (matches == null) { - //Copy all wordMatches to titleMatches - for (String internalname : wordMatches.keySet()) { + if (!(wordMatches != null && !wordMatches.isEmpty())) continue; + if (matches == null) { + //Copy all wordMatches to titleMatches + for (String internalname : wordMatches.keySet()) { + if (!matchesToKeep.containsKey(internalname)) { + matchesToKeep.put(internalname, new ArrayList<>()); + } + matchesToKeep.get(internalname).addAll(wordMatches.get(internalname)); + } + } else { + for (String internalname : matches.keySet()) { + if (!wordMatches.containsKey(internalname)) continue; + for (Integer newIndex : wordMatches.get(internalname)) { + if (!matches.get(internalname).contains(newIndex - 1)) continue; if (!matchesToKeep.containsKey(internalname)) { matchesToKeep.put(internalname, new ArrayList<>()); } - matchesToKeep.get(internalname).addAll(wordMatches.get(internalname)); - } - } else { - for (String internalname : matches.keySet()) { - if (wordMatches.containsKey(internalname)) { - for (Integer newIndex : wordMatches.get(internalname)) { - if (matches.get(internalname).contains(newIndex - 1)) { - if (!matchesToKeep.containsKey(internalname)) { - matchesToKeep.put(internalname, new ArrayList<>()); - } - matchesToKeep.get(internalname).add(newIndex); - } - } - } + matchesToKeep.get(internalname).add(newIndex); } } } @@ -1475,5 +1468,4 @@ public class NEUManager { return stack; } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index 2b518fec..18e0fc3b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -68,7 +68,6 @@ import java.util.concurrent.atomic.AtomicReference; import static io.github.moulberry.notenoughupdates.util.GuiTextures.*; public class NEUOverlay extends Gui { - private static final ResourceLocation SUPERGEHEIMNISVERMOGEN = new ResourceLocation("notenoughupdates:supersecretassets/bald.png"); private static final ResourceLocation SEARCH_BAR = new ResourceLocation("notenoughupdates:search_bar.png"); private static final ResourceLocation SEARCH_BAR_GOLD = new ResourceLocation("notenoughupdates:search_bar_gold.png"); @@ -236,11 +235,8 @@ public class NEUOverlay extends Gui { int paddingUnscaled = getPaddingUnscaled(); GlStateManager.color(1, 1, 1, 1); - if (searchMode) { - Minecraft.getMinecraft().getTextureManager().bindTexture(SEARCH_BAR_GOLD); - } else { - Minecraft.getMinecraft().getTextureManager().bindTexture(SEARCH_BAR); - } + + Minecraft.getMinecraft().getTextureManager().bindTexture(searchMode ? SEARCH_BAR_GOLD : SEARCH_BAR); int w = getWidth(); int h = getHeight(); @@ -316,8 +312,7 @@ public class NEUOverlay extends Gui { } @Override - public void recalculate() { - } + public void recalculate() {} }; } @@ -334,8 +329,7 @@ public class NEUOverlay extends Gui { } @Override - public void recalculate() { - } + public void recalculate() {} @Override public void mouseClick(float x, float y, int mouseX, int mouseY) { @@ -348,8 +342,7 @@ public class NEUOverlay extends Gui { } @Override - public void mouseClickOutside() { - } + public void mouseClickOutside() {} @Override public void render(float x, float y) { @@ -387,8 +380,7 @@ public class NEUOverlay extends Gui { } @Override - public void recalculate() { - } + public void recalculate() {} @Override public void mouseClick(float x, float y, int mouseX, int mouseY) { @@ -405,8 +397,7 @@ public class NEUOverlay extends Gui { } @Override - public void mouseClickOutside() { - } + public void mouseClickOutside() {} @Override public void render(float x, float y) { @@ -445,8 +436,7 @@ public class NEUOverlay extends Gui { } @Override - public void recalculate() { - } + public void recalculate() {} @Override public void mouseClick(float x, float y, int mouseX, int mouseY) { @@ -467,8 +457,7 @@ public class NEUOverlay extends Gui { } @Override - public void mouseClickOutside() { - } + public void mouseClickOutside() {} @Override public void render(float x, float y) { @@ -2060,8 +2049,6 @@ public class NEUOverlay extends Gui { /** * Sets the current page and marks that the itemsPane should be redrawn - * - * @param page */ public void setPage(int page) { this.page = page; @@ -2356,5 +2343,4 @@ public class NEUOverlay extends Gui { public float getInfoPaneOffsetFactor() { return infoPaneOffsetFactor.getValue() * getWidthMult(); } - }
\ No newline at end of file diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java index 881e3d3c..23b89b44 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java @@ -78,18 +78,15 @@ public class NotEnoughUpdates { public Commands commands; - public static HashMap<String, String> petRarityToColourMap = new HashMap<>(); - - static { - petRarityToColourMap.put("UNKNOWN", EnumChatFormatting.RED.toString()); - - petRarityToColourMap.put("COMMON", EnumChatFormatting.WHITE.toString()); - petRarityToColourMap.put("UNCOMMON", EnumChatFormatting.GREEN.toString()); - petRarityToColourMap.put("RARE", EnumChatFormatting.BLUE.toString()); - petRarityToColourMap.put("EPIC", EnumChatFormatting.DARK_PURPLE.toString()); - petRarityToColourMap.put("LEGENDARY", EnumChatFormatting.GOLD.toString()); - petRarityToColourMap.put("MYTHIC", EnumChatFormatting.LIGHT_PURPLE.toString()); - } + public static HashMap<String, String> petRarityToColourMap = new HashMap<String, String>() {{ + put("UNKNOWN", EnumChatFormatting.RED.toString()); + put("COMMON", EnumChatFormatting.WHITE.toString()); + put("UNCOMMON", EnumChatFormatting.GREEN.toString()); + put("RARE", EnumChatFormatting.BLUE.toString()); + put("EPIC", EnumChatFormatting.DARK_PURPLE.toString()); + put("LEGENDARY", EnumChatFormatting.GOLD.toString()); + put("MYTHIC", EnumChatFormatting.LIGHT_PURPLE.toString()); + }}; public static ProfileViewer profileViewer; @@ -104,8 +101,6 @@ public class NotEnoughUpdates { /** * Instantiates NEUIo, NEUManager and NEUOverlay instances. Registers keybinds and adds a shutdown hook to clear tmp folder. - * - * @param event */ @EventHandler public void preinit(FMLPreInitializationEvent event) { @@ -339,6 +334,5 @@ public class NotEnoughUpdates { hasSkyblockScoreboard = false; } - } } 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 6726093d..b3e145a8 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java @@ -30,7 +30,6 @@ import java.util.concurrent.Executors; import java.util.function.Consumer; public class APIManager { - private final NEUManager manager; public final CustomAH customAH; @@ -1001,5 +1000,4 @@ public class APIManager { } }, 3000L, TimeUnit.MILLISECONDS); }*/ - } 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 a408100d..449fff1e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java @@ -45,7 +45,6 @@ import java.util.regex.Pattern; import static io.github.moulberry.notenoughupdates.util.GuiTextures.*; public class CustomAH extends Gui { - private enum PriceFilter { Greater, Less, @@ -439,21 +438,19 @@ public class CustomAH extends Gui { GlStateManager.disableBlend(); } - private final HashMap<Pattern, Long> timeParseMap = new HashMap<>(); + private final HashMap<Pattern, Long> timeParseMap = new HashMap<Pattern, Long>() {{ + Pattern dayPattern = Pattern.compile("([0-9]+)d"); + Pattern hourPattern = Pattern.compile("([0-9]+)h"); + Pattern minutePattern = Pattern.compile("([0-9]+)m"); + Pattern secondPattern = Pattern.compile("([0-9]+)s"); - public long prettyTimeToMillis(String endsInStr) { - if (timeParseMap.isEmpty()) { - Pattern dayPattern = Pattern.compile("([0-9]+)d"); - Pattern hourPattern = Pattern.compile("([0-9]+)h"); - Pattern minutePattern = Pattern.compile("([0-9]+)m"); - Pattern secondPattern = Pattern.compile("([0-9]+)s"); - - timeParseMap.put(dayPattern, 24 * 60 * 60 * 1000L); - timeParseMap.put(hourPattern, 60 * 60 * 1000L); - timeParseMap.put(minutePattern, 60 * 1000L); - timeParseMap.put(secondPattern, 1000L); - } + put(dayPattern, 24 * 60 * 60 * 1000L); + put(hourPattern, 60 * 60 * 1000L); + put(minutePattern, 60 * 1000L); + put(secondPattern, 1000L); + }}; + public long prettyTimeToMillis(String endsInStr) { if (endsInStr != null) { long timeUntilEnd = 0; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAHGui.java b/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAHGui.java index a42fdb64..4602120a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAHGui.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAHGui.java @@ -3,7 +3,6 @@ package io.github.moulberry.notenoughupdates.auction; import net.minecraft.client.gui.GuiScreen; public class CustomAHGui extends GuiScreen { - public CustomAHGui() { this.allowUserInput = true; } @@ -11,5 +10,4 @@ public class CustomAHGui extends GuiScreen { public boolean doesGuiPauseGame() { return false; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/collectionlog/CollectionConstant.java b/src/main/java/io/github/moulberry/notenoughupdates/collectionlog/CollectionConstant.java index 25f6cfca..6931ceea 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/collectionlog/CollectionConstant.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/collectionlog/CollectionConstant.java @@ -5,7 +5,6 @@ import java.util.List; import java.util.regex.Pattern; public class CollectionConstant { - public static class DropEntry { public String type; public Pattern regex; @@ -13,5 +12,4 @@ public class CollectionConstant { } public List<DropEntry> dropdata; - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/collectionlog/GuiCollectionLog.java b/src/main/java/io/github/moulberry/notenoughupdates/collectionlog/GuiCollectionLog.java index ed479e79..39e27d57 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/collectionlog/GuiCollectionLog.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/collectionlog/GuiCollectionLog.java @@ -12,7 +12,6 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; public class GuiCollectionLog extends GuiScreen { - private static final ResourceLocation COLLECTION_LOG_TEX = new ResourceLocation("notenoughupdates:collectionlog.png"); @Override diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/ClientCommandBase.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/ClientCommandBase.java index 39d8bb24..c00d7c72 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/ClientCommandBase.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/ClientCommandBase.java @@ -4,7 +4,6 @@ import net.minecraft.command.CommandBase; import net.minecraft.command.ICommandSender; public abstract class ClientCommandBase extends CommandBase { - private final String name; protected ClientCommandBase(String name) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java index 3be881ac..97004752 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java @@ -56,7 +56,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; public class Commands { - public Commands() { //ClientCommandHandler.instance.registerCommand(collectionLogCommand); //ClientCommandHandler.instance.registerCommand(collectionLogCommand2); @@ -909,8 +908,7 @@ public class Commands { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("")); NotEnoughUpdates.INSTANCE.displayLinks(update); Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("")); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } } }); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/SimpleCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/SimpleCommand.java index f13dca10..2e2e2831 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/SimpleCommand.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/SimpleCommand.java @@ -8,7 +8,6 @@ import net.minecraft.util.BlockPos; import java.util.List; public class SimpleCommand extends CommandBase { - private final String commandName; private final ProcessCommandRunnable runnable; private TabCompleteRunnable tabRunnable; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/StatsCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/StatsCommand.java index 3888e3ea..99bfe368 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/StatsCommand.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/StatsCommand.java @@ -27,7 +27,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class StatsCommand extends ClientCommandBase { - private final ExecutorService threadPool = Executors.newFixedThreadPool(1); public StatsCommand() { @@ -147,5 +146,4 @@ public class StatsCommand extends ClientCommandBase { } return -1; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/BackgroundBlur.java b/src/main/java/io/github/moulberry/notenoughupdates/core/BackgroundBlur.java index 98b4ccfe..b21421a3 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/BackgroundBlur.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/BackgroundBlur.java @@ -23,7 +23,6 @@ import java.util.Map; import java.util.Set; public class BackgroundBlur { - private static class OutputStuff { public Framebuffer framebuffer; public Shader blurShaderHorz = null; @@ -260,5 +259,4 @@ public class BackgroundBlur { out.framebuffer.unbindFramebufferTexture(); GlStateManager.depthMask(true); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/ChromaColour.java b/src/main/java/io/github/moulberry/notenoughupdates/core/ChromaColour.java index 1581c77c..238ede58 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/ChromaColour.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/ChromaColour.java @@ -3,7 +3,6 @@ package io.github.moulberry.notenoughupdates.core; import java.awt.*; public class ChromaColour { - public static String special(int chromaSpeed, int alpha, int rgb) { return special(chromaSpeed, alpha, (rgb & 0xFF0000) >> 16, (rgb & 0x00FF00) >> 8, (rgb & 0x0000FF)); } @@ -90,5 +89,4 @@ public class ChromaColour { return (a & 0xFF) << 24 | (Color.HSBtoRGB(hsv[0], hsv[1], hsv[2]) & 0x00FFFFFF); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/GlScissorStack.java b/src/main/java/io/github/moulberry/notenoughupdates/core/GlScissorStack.java index 45f7e269..7de02783 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/GlScissorStack.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/GlScissorStack.java @@ -7,7 +7,6 @@ import org.lwjgl.opengl.GL11; import java.util.LinkedList; public class GlScissorStack { - private static class Bounds { int left; int top; @@ -83,5 +82,4 @@ public class GlScissorStack { boundsStack.clear(); GL11.glDisable(GL11.GL_SCISSOR_TEST); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElement.java b/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElement.java index aa3d4989..88dd7f01 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElement.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElement.java @@ -3,7 +3,6 @@ package io.github.moulberry.notenoughupdates.core; import net.minecraft.client.gui.Gui; public abstract class GuiElement extends Gui { - public abstract void render(); public abstract boolean mouseInput(int mouseX, int mouseY); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java b/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java index 66310dfd..be13e410 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java @@ -11,7 +11,6 @@ import org.lwjgl.input.Mouse; import java.util.function.Consumer; public class GuiElementBoolean extends GuiElement { - public int x; public int y; private boolean value; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementColour.java b/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementColour.java index 6d267040..cf25cefe 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementColour.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementColour.java @@ -18,7 +18,6 @@ import java.awt.image.BufferedImage; import java.util.function.Consumer; public class GuiElementColour extends GuiElement { - public static final ResourceLocation colour_selector_dot = new ResourceLocation("notenoughupdates:core/colour_selector_dot.png"); public static final ResourceLocation colour_selector_bar = new ResourceLocation("notenoughupdates:core/colour_selector_bar.png"); public static final ResourceLocation colour_selector_bar_alpha = new ResourceLocation("notenoughupdates:core/colour_selector_bar_alpha.png"); @@ -395,5 +394,4 @@ public class GuiElementColour extends GuiElement { } return false; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementTextField.java b/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementTextField.java index 5b52515d..32303e58 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementTextField.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementTextField.java @@ -15,7 +15,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class GuiElementTextField { - public static final int SCISSOR_TEXT = 0b10000000; public static final int DISABLE_BG = 0b1000000; public static final int SCALE_TEXT = 0b100000; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/GuiScreenElementWrapper.java b/src/main/java/io/github/moulberry/notenoughupdates/core/GuiScreenElementWrapper.java index 8d32d6c3..8fdd0652 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/GuiScreenElementWrapper.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/GuiScreenElementWrapper.java @@ -6,7 +6,6 @@ import org.lwjgl.input.Mouse; import java.io.IOException; public class GuiScreenElementWrapper extends GuiScreen { - public final GuiElement element; public GuiScreenElementWrapper(GuiElement element) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/Config.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/Config.java index f5d8488c..2186a002 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/Config.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/Config.java @@ -1,7 +1,5 @@ package io.github.moulberry.notenoughupdates.core.config; public class Config { - public void executeRunnable(int runnableId) {} - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/GuiPositionEditor.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/GuiPositionEditor.java index 1a69789b..030cbe21 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/GuiPositionEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/GuiPositionEditor.java @@ -8,7 +8,6 @@ import net.minecraft.client.gui.ScaledResolution; import java.io.IOException; public class GuiPositionEditor extends GuiScreen { - public PositionNew position = new PositionNew(); public int clickedX; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/KeybindHelper.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/KeybindHelper.java index b1013047..bc9d5e5b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/KeybindHelper.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/KeybindHelper.java @@ -4,7 +4,6 @@ import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; public class KeybindHelper { - public static String getKeyName(int keyCode) { if (keyCode == 0) { return "NONE"; @@ -46,5 +45,4 @@ public class KeybindHelper { return Keyboard.getEventKeyState() && Keyboard.getEventKey() == keyCode; } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/Position.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/Position.java index 270570f8..e0787a16 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/Position.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/Position.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.Expose; import net.minecraft.client.gui.ScaledResolution; public class Position { - @Expose private int x; @Expose @@ -187,5 +186,4 @@ public class Position { } return deltaY; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/PositionNew.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/PositionNew.java index a0029dd8..62719091 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/PositionNew.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/PositionNew.java @@ -7,7 +7,6 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; public class PositionNew { - public enum Anchor { MIN(0, 0, 0), MID(0.5f, -0.5f, 0), @@ -59,8 +58,7 @@ public class PositionNew { this.allowResize = allowResize; } - protected PositionNew() { - } + protected PositionNew() {} public int moveX(ScaledResolution scaledResolution, int deltaX, int sizeX) { int originalX = resolveX(scaledResolution, sizeX); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/Category.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/Category.java index 2611b466..5f079a55 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/Category.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/Category.java @@ -8,9 +8,7 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface Category { - String name(); String desc(); - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigAccordionId.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigAccordionId.java index 54d3e345..d889402f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigAccordionId.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigAccordionId.java @@ -8,7 +8,5 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface ConfigAccordionId { - int id(); - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorAccordion.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorAccordion.java index 47948985..1333136e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorAccordion.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorAccordion.java @@ -8,7 +8,5 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface ConfigEditorAccordion { - int id(); - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorBoolean.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorBoolean.java index 3c6465e6..a0ca1f38 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorBoolean.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorBoolean.java @@ -7,6 +7,4 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) -public @interface ConfigEditorBoolean { - -} +public @interface ConfigEditorBoolean {} diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorButton.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorButton.java index be8363d5..b6419fbc 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorButton.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorButton.java @@ -8,9 +8,7 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface ConfigEditorButton { - int runnableId(); String buttonText() default ""; - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorColour.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorColour.java index e7033f69..6640ade9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorColour.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorColour.java @@ -7,6 +7,4 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) -public @interface ConfigEditorColour { - -} +public @interface ConfigEditorColour {} diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorDraggableList.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorDraggableList.java index 8689bda8..07a504bf 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorDraggableList.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorDraggableList.java @@ -8,7 +8,5 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface ConfigEditorDraggableList { - String[] exampleText(); - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorDropdown.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorDropdown.java index e878d657..a921de5a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorDropdown.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorDropdown.java @@ -8,9 +8,7 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface ConfigEditorDropdown { - String[] values(); int initialIndex() default 0; - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorFSR.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorFSR.java index e6ec3548..7dfd05d7 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorFSR.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorFSR.java @@ -8,9 +8,7 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface ConfigEditorFSR { - int runnableId(); String buttonText() default ""; - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorKeybind.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorKeybind.java index 527171f2..361d6c9a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorKeybind.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorKeybind.java @@ -8,7 +8,5 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface ConfigEditorKeybind { - int defaultKey(); - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorSlider.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorSlider.java index 4a6fb5be..f562d14e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorSlider.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorSlider.java @@ -8,11 +8,9 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface ConfigEditorSlider { - float minValue(); float maxValue(); float minStep(); - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorText.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorText.java index 556bbb1e..1ff7e39e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorText.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorText.java @@ -7,6 +7,4 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) -public @interface ConfigEditorText { - -} +public @interface ConfigEditorText {} diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigOption.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigOption.java index 77738abf..3b0c27cf 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigOption.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigOption.java @@ -8,11 +8,9 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface ConfigOption { - String name(); String desc(); int subcategoryId() default -1; - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditor.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditor.java index 3ccb3841..3f476906 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditor.java @@ -8,7 +8,6 @@ import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.GlStateManager; public abstract class GuiOptionEditor { - protected final ConfigProcessor.ProcessedOption option; private static final int HEIGHT = 45; @@ -60,5 +59,4 @@ public abstract class GuiOptionEditor { } public void renderOverlay(int x, int y, int width) {} - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorAccordion.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorAccordion.java index 7406f2c3..7f316af9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorAccordion.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorAccordion.java @@ -12,7 +12,6 @@ import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; public class GuiOptionEditorAccordion extends GuiOptionEditor { - private final int accordionId; private boolean accordionToggled; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorBoolean.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorBoolean.java index 8c8c32b6..7bdca50d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorBoolean.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorBoolean.java @@ -4,7 +4,6 @@ import io.github.moulberry.notenoughupdates.core.GuiElementBoolean; import io.github.moulberry.notenoughupdates.core.config.struct.ConfigProcessor; public class GuiOptionEditorBoolean extends GuiOptionEditor { - private final GuiElementBoolean bool; public GuiOptionEditorBoolean(ConfigProcessor.ProcessedOption option) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorButton.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorButton.java index 82d965e3..e9eb457b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorButton.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorButton.java @@ -11,7 +11,6 @@ import org.lwjgl.input.Mouse; import static io.github.moulberry.notenoughupdates.util.GuiTextures.button_tex; public class GuiOptionEditorButton extends GuiOptionEditor { - private final int runnableId; private String buttonText; private final Config config; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorColour.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorColour.java index 4cd74e79..40dfb8f0 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorColour.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorColour.java @@ -11,7 +11,6 @@ import org.lwjgl.input.Mouse; import static io.github.moulberry.notenoughupdates.util.GuiTextures.button_white; public class GuiOptionEditorColour extends GuiOptionEditor { - private String chromaColour; private GuiElementColour colourElement = null; @@ -67,5 +66,4 @@ public class GuiOptionEditorColour extends GuiOptionEditor { public boolean keyboardInput() { return colourElement != null && colourElement.keyboardInput(); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDraggableList.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDraggableList.java index c91f2b6a..2552c8ae 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDraggableList.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDraggableList.java @@ -21,7 +21,6 @@ import java.util.List; import static io.github.moulberry.notenoughupdates.util.GuiTextures.button_tex; public class GuiOptionEditorDraggableList extends GuiOptionEditor { - private static final ResourceLocation DELETE = new ResourceLocation("notenoughupdates:core/delete.png"); private final String[] exampleText; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDropdown.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDropdown.java index c003f135..e75d9a54 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDropdown.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDropdown.java @@ -9,7 +9,6 @@ import net.minecraft.client.gui.Gui; import org.lwjgl.input.Mouse; public class GuiOptionEditorDropdown extends GuiOptionEditor { - private final String[] values; private final boolean useOrdinal; private int selected; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorFSR.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorFSR.java index 545241c0..185251c3 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorFSR.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorFSR.java @@ -11,7 +11,6 @@ import org.lwjgl.input.Mouse; import static io.github.moulberry.notenoughupdates.util.GuiTextures.button_fsr; public class GuiOptionEditorFSR extends GuiOptionEditor { - private final int runnableId; private String buttonText; private final Config config; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorKeybind.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorKeybind.java index c1297668..a20ba3bf 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorKeybind.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorKeybind.java @@ -14,7 +14,6 @@ import org.lwjgl.opengl.GL11; import static io.github.moulberry.notenoughupdates.util.GuiTextures.button_tex; public class GuiOptionEditorKeybind extends GuiOptionEditor { - private static final ResourceLocation RESET = new ResourceLocation("notenoughupdates:itemcustomize/reset.png"); private int keyCode; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorSlider.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorSlider.java index 50e98a1d..53ef95ca 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorSlider.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorSlider.java @@ -8,7 +8,6 @@ import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; public class GuiOptionEditorSlider extends GuiOptionEditor { - private final GuiElementSlider slider; private final GuiElementTextField textField; @@ -126,5 +125,4 @@ public class GuiOptionEditorSlider extends GuiOptionEditor { } return false; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorText.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorText.java index b05c3ee3..19dcefd0 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorText.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorText.java @@ -7,7 +7,6 @@ import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; public class GuiOptionEditorText extends GuiOptionEditor { - private final GuiElementTextField textField; public GuiOptionEditorText(ConfigProcessor.ProcessedOption option) { @@ -77,5 +76,4 @@ public class GuiOptionEditorText extends GuiOptionEditor { } return false; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiPositionEditor.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiPositionEditor.java index 467d2b93..22c143c9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiPositionEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiPositionEditor.java @@ -12,7 +12,6 @@ import org.lwjgl.input.Mouse; import java.io.IOException; public class GuiPositionEditor extends GuiScreen { - private final Position position; private final Position originalPosition; private final int elementWidth; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/struct/ConfigProcessor.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/struct/ConfigProcessor.java index 3c4e6833..0df39015 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/struct/ConfigProcessor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/struct/ConfigProcessor.java @@ -10,7 +10,6 @@ import java.util.LinkedHashMap; import java.util.List; public class ConfigProcessor { - public static class ProcessedCategory { public final String name; public final String desc; @@ -180,5 +179,4 @@ public class ConfigProcessor { } return processedConfig; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/util/GuiElementSlider.java b/src/main/java/io/github/moulberry/notenoughupdates/core/util/GuiElementSlider.java index cc8e9708..9f65c23d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/util/GuiElementSlider.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/util/GuiElementSlider.java @@ -13,7 +13,6 @@ import java.util.function.Consumer; import static io.github.moulberry.notenoughupdates.util.GuiTextures.*; public class GuiElementSlider extends GuiElement { - public int x; public int y; public int width; @@ -119,5 +118,4 @@ public class GuiElementSlider extends GuiElement { public boolean keyboardInput() { return false; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/util/MiscUtils.java b/src/main/java/io/github/moulberry/notenoughupdates/core/util/MiscUtils.java index 6e3ad7d1..342916d9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/util/MiscUtils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/util/MiscUtils.java @@ -20,7 +20,6 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; public class MiscUtils { - public static void copyToClipboard(String str) { Toolkit.getDefaultToolkit().getSystemClipboard() .setContents(new StringSelection(str), null); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/util/Splitters.java b/src/main/java/io/github/moulberry/notenoughupdates/core/util/Splitters.java index 66458e2f..46244c5e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/util/Splitters.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/util/Splitters.java @@ -3,7 +3,5 @@ package io.github.moulberry.notenoughupdates.core.util; import com.google.common.base.Splitter; public class Splitters { - public static final Splitter NEWLINE_SPLITTER = Splitter.on('\n'); - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/util/StringUtils.java b/src/main/java/io/github/moulberry/notenoughupdates/core/util/StringUtils.java index 80308938..49cd7910 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/util/StringUtils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/util/StringUtils.java @@ -7,7 +7,6 @@ import net.minecraft.client.gui.FontRenderer; import java.util.Set; public class StringUtils { - public static final Set<String> PROTOCOLS = Sets.newHashSet("http", "https"); public static String cleanColour(String in) { @@ -35,5 +34,4 @@ public class StringUtils { return trim; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/util/lerp/LerpUtils.java b/src/main/java/io/github/moulberry/notenoughupdates/core/util/lerp/LerpUtils.java index 46d00293..fb89b895 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/util/lerp/LerpUtils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/util/lerp/LerpUtils.java @@ -1,7 +1,6 @@ package io.github.moulberry.notenoughupdates.core.util.lerp; public class LerpUtils { - public static float clampZeroOne(float f) { return Math.max(0, Math.min(1, f)); } @@ -22,5 +21,4 @@ public class LerpUtils { public static float lerp(float a, float b, float amount) { return b + (a - b) * clampZeroOne(amount); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/util/lerp/LerpingFloat.java b/src/main/java/io/github/moulberry/notenoughupdates/core/util/lerp/LerpingFloat.java index afd805f6..b7d0c203 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/util/lerp/LerpingFloat.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/util/lerp/LerpingFloat.java @@ -1,7 +1,6 @@ package io.github.moulberry.notenoughupdates.core.util.lerp; public class LerpingFloat { - private int timeSpent; private long lastMillis; private final int timeToReachTarget; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/util/lerp/LerpingInteger.java b/src/main/java/io/github/moulberry/notenoughupdates/core/util/lerp/LerpingInteger.java index cfb44029..8bc95d66 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/util/lerp/LerpingInteger.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/util/lerp/LerpingInteger.java @@ -1,7 +1,6 @@ package io.github.moulberry.notenoughupdates.core.util.lerp; public class LerpingInteger { - private int timeSpent; private long lastMillis; private int timeToReachTarget; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/util/render/RenderUtils.java b/src/main/java/io/github/moulberry/notenoughupdates/core/util/render/RenderUtils.java index 6d847928..8ffd7f3a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/util/render/RenderUtils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/util/render/RenderUtils.java @@ -19,7 +19,6 @@ import org.lwjgl.opengl.GL14; import org.lwjgl.util.vector.Vector3f; public class RenderUtils { - public static void drawFloatingRectDark(int x, int y, int width, int height) { drawFloatingRectDark(x, y, width, height, true); } @@ -386,5 +385,4 @@ public class RenderUtils { GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.popMatrix(); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/util/render/TextRenderUtils.java b/src/main/java/io/github/moulberry/notenoughupdates/core/util/render/TextRenderUtils.java index 9a3ac351..f2bf89a7 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/util/render/TextRenderUtils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/util/render/TextRenderUtils.java @@ -13,7 +13,6 @@ import java.util.ArrayList; import java.util.List; public class TextRenderUtils { - public static int getCharVertLen(char c) { if ("acegmnopqrsuvwxyz".indexOf(c) >= 0) { return 5; @@ -211,5 +210,4 @@ public class TextRenderUtils { } GlStateManager.disableLighting(); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java index 768c316b..56e9d9c2 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java @@ -26,7 +26,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class CapeManager { - public static final CapeManager INSTANCE = new CapeManager(); public long lastCapeUpdate = 0; public long lastCapeSynced = 0; @@ -57,6 +56,17 @@ public class CapeManager { } public CapeData[] capes = new CapeData[]{ + //Patreon + new CapeData("patreon1", false, false), + new CapeData("patreon2", false, false), + new CapeData("fade", false, false), + new CapeData("space", false, false), + new CapeData("mcworld", false, false), + new CapeData("negative", false, false), + new CapeData("void", false, false), + new CapeData("lava", false, false), + new CapeData("tunnel", false, false), + new CapeData("planets", false, false), //Admins new CapeData("nullzee", true, false), @@ -92,28 +102,8 @@ public class CapeManager { new CapeData("alexxoffi", false, true), new CapeData("secondpfirsisch", false, true), new CapeData("stormy_lh", false, true), - - //Patreon - new CapeData("patreon1", false, false), - new CapeData("patreon2", false, false), - new CapeData("fade", false, false), - new CapeData("space", false, false), - new CapeData("mcworld", false, false), - new CapeData("negative", false, false), - new CapeData("void", false, false), - new CapeData("lava", false, false), - new CapeData("tunnel", false, false), - new CapeData("planets", false, false) - }; - /*private String[] capes = new String[]{"patreon1", "patreon2", "fade", "contrib", "nullzee", - "gravy", "space", "mcworld", "lava", "packshq", "mbstaff", "thebakery", "negative", - "void", "ironmoon", "krusty", "furf", "soldier", "dsm", "zera", "tunnel", "alexxoffi", "parallax", "jakethybro", "planets", "skytils" }; - public Boolean[] specialCapes = new Boolean[] {true, true, false, true, true, - true, false, false, false, true, true, true, false, - false, true, false, true, true, true, true, false, true, true, true, true, true };*/ - public static CapeManager getInstance() { return INSTANCE; } @@ -135,7 +125,6 @@ public class CapeManager { } private void updateCapes() { - NotEnoughUpdates.INSTANCE.manager.hypixelApi.getMyApiAsync("activecapes.json", (jsonObject) -> { if (jsonObject.get("success").getAsBoolean()) { lastJsonSync = jsonObject; @@ -155,28 +144,25 @@ public class CapeManager { String uuid = Minecraft.getMinecraft().thePlayer.getUniqueID().toString().replace("-", ""); permSyncTries--; NotEnoughUpdates.INSTANCE.manager.hypixelApi.getMyApiAsync("permscapes.json", (jsonObject) -> { - if (jsonObject.get("success").getAsBoolean()) { - permSyncTries = 0; - - availableCapes.clear(); - for (JsonElement permPlayer : jsonObject.get("perms").getAsJsonArray()) { - if (permPlayer.isJsonObject()) { - String playerUuid = permPlayer.getAsJsonObject().get("_id").getAsString(); - if (playerUuid != null && playerUuid.equals(uuid)) { - for (JsonElement perm : permPlayer.getAsJsonObject().get("perms").getAsJsonArray()) { - if (perm.isJsonPrimitive()) { - String cape = perm.getAsString(); - if (cape.equals("*")) { - allAvailable = true; - } else { - availableCapes.add(cape); - } - } - } - return; - } + if (!jsonObject.get("success").getAsBoolean()) return; + + permSyncTries = 0; + availableCapes.clear(); + for (JsonElement permPlayer : jsonObject.get("perms").getAsJsonArray()) { + if (!permPlayer.isJsonObject()) continue; + String playerUuid = permPlayer.getAsJsonObject().get("_id").getAsString(); + if (!(playerUuid != null && playerUuid.equals(uuid))) continue; + for (JsonElement perm : permPlayer.getAsJsonObject().get("perms").getAsJsonArray()) { + if (!perm.isJsonPrimitive()) continue; + String cape = perm.getAsString(); + if (cape.equals("*")) { + allAvailable = true; + } else { + availableCapes.add(cape); } + } + return; } }, () -> System.out.println("[MBAPI] Update capes errored - perms")); } @@ -195,11 +181,7 @@ public class CapeManager { } if (updateConfig) { - if (none) { - localCape = null; - } else { - localCape = new MutablePair<>(new NEUCape(capename), capename); - } + localCape = none ? null : new MutablePair<>(new NEUCape(capename), capename); } else if (capeMap.containsKey(playerUUID)) { if (none) { capeMap.remove(playerUUID); @@ -293,8 +275,7 @@ public class CapeManager { } else if (!Minecraft.getMinecraft().thePlayer.isPotionActive(Potion.blindness) && capeMap.containsKey(uuid)) { capeMap.get(uuid).getLeft().onRenderPlayer(e); } - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } public static void onTickSlow() { @@ -366,5 +347,4 @@ public class CapeManager { public CapeData[] getCapes() { return capes; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeNode.java b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeNode.java index 0ab08706..94b82d11 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeNode.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeNode.java @@ -13,7 +13,6 @@ import java.util.HashMap; import java.util.List; public class CapeNode { - private static final NEUCape.Direction[] cardinals = new NEUCape.Direction[]{NEUCape.Direction.UP, NEUCape.Direction.RIGHT, NEUCape.Direction.DOWN, NEUCape.Direction.LEFT}; public Vector3f position; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/GuiCosmetics.java b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/GuiCosmetics.java index 7f55f2db..12a9644a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/GuiCosmetics.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/GuiCosmetics.java @@ -31,7 +31,6 @@ import java.util.List; import java.util.Random; public class GuiCosmetics extends GuiScreen { - public static final ResourceLocation pv_bg = new ResourceLocation("notenoughupdates:pv_bg.png"); public static final ResourceLocation pv_dropdown = new ResourceLocation("notenoughupdates:pv_dropdown.png"); public static final ResourceLocation cosmetics_fg = new ResourceLocation("notenoughupdates:cosmetics_fg.png"); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/NEUCape.java b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/NEUCape.java index 2142f1e8..4ed97089 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/NEUCape.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/NEUCape.java @@ -27,7 +27,6 @@ import java.nio.FloatBuffer; import java.util.*; public class NEUCape { - private int currentFrame = 0; private int displayFrame = 0; private String capeName; @@ -414,8 +413,7 @@ public class NEUCape { private static double interpolateRotation(float a, float b, float amount) { double f; - for (f = b - a; f < -180.0F; f += 360.0F) { - } + for (f = b - a; f < -180.0F; f += 360.0F) {} while (f >= 180.0F) { f -= 360.0F; @@ -1285,5 +1283,4 @@ public class NEUCape { } renderNodes(); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/ShaderManager.java b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/ShaderManager.java index 6801b4c8..97d80832 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/ShaderManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/ShaderManager.java @@ -15,7 +15,6 @@ import java.io.InputStreamReader; import java.util.HashMap; public class ShaderManager { - private final ResourceLocation shaderLocation = new ResourceLocation("notenoughupdates:shaders"); private final HashMap<String, Shader> shaderMap = new HashMap<>(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonBlocks.java b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonBlocks.java index e29ccca4..7b7e7f54 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonBlocks.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonBlocks.java @@ -25,7 +25,6 @@ import java.util.HashSet; import java.util.Map; public class DungeonBlocks { - private static Framebuffer framebufferBlocksTo = null; private static Framebuffer framebufferBlocksFrom = null; @@ -142,20 +141,13 @@ public class DungeonBlocks { return false; } - private static final HashMap<ResourceLocation, String> dynamicPreloadMap = new HashMap<>(); - - static { - dynamicPreloadMap.put(new ResourceLocation("textures/entity/bat.png"), - NotEnoughUpdates.INSTANCE.config.dungeons.dungBatColour); - dynamicPreloadMap.put(new ResourceLocation("textures/entity/chest/normal.png"), - NotEnoughUpdates.INSTANCE.config.dungeons.dungChestColour); - dynamicPreloadMap.put(new ResourceLocation("textures/entity/chest/normal_double.png"), - NotEnoughUpdates.INSTANCE.config.dungeons.dungChestColour); - dynamicPreloadMap.put(new ResourceLocation("textures/entity/chest/trapped.png"), - NotEnoughUpdates.INSTANCE.config.dungeons.dungTrappedChestColour); - dynamicPreloadMap.put(new ResourceLocation("textures/entity/chest/trapped_double.png"), - NotEnoughUpdates.INSTANCE.config.dungeons.dungTrappedChestColour); - } + private static final HashMap<ResourceLocation, String> dynamicPreloadMap = new HashMap<ResourceLocation, String>() {{ + put(new ResourceLocation("textures/entity/bat.png"), NotEnoughUpdates.INSTANCE.config.dungeons.dungBatColour); + put(new ResourceLocation("textures/entity/chest/normal.png"), NotEnoughUpdates.INSTANCE.config.dungeons.dungChestColour); + put(new ResourceLocation("textures/entity/chest/normal_double.png"), NotEnoughUpdates.INSTANCE.config.dungeons.dungChestColour); + put(new ResourceLocation("textures/entity/chest/trapped.png"), NotEnoughUpdates.INSTANCE.config.dungeons.dungTrappedChestColour); + put(new ResourceLocation("textures/entity/chest/trapped_double.png"), NotEnoughUpdates.INSTANCE.config.dungeons.dungTrappedChestColour); + }}; public static void tick() { if (!isOverriding() || Minecraft.getMinecraft().theWorld == null) { @@ -195,15 +187,16 @@ public class DungeonBlocks { GlStateManager.color(1, 1, 1, 1); Utils.drawTexturedRectNoBlend(0, 0, w, h, 0, 1, 1, 0, GL11.GL_LINEAR); - HashMap<TextureAtlasSprite, Integer> spriteMap = new HashMap<>(); - spriteMap.put(Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("minecraft:blocks/stonebrick_cracked"), - SpecialColour.specialToChromaRGB(NotEnoughUpdates.INSTANCE.config.dungeons.dungCrackedColour)); - spriteMap.put(Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("minecraft:blocks/dispenser_front_horizontal"), - SpecialColour.specialToChromaRGB(NotEnoughUpdates.INSTANCE.config.dungeons.dungDispenserColour)); - spriteMap.put(Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("minecraft:blocks/lever"), - SpecialColour.specialToChromaRGB(NotEnoughUpdates.INSTANCE.config.dungeons.dungLeverColour)); - spriteMap.put(Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("minecraft:blocks/trip_wire"), - SpecialColour.specialToChromaRGB(NotEnoughUpdates.INSTANCE.config.dungeons.dungTripWireColour)); + HashMap<TextureAtlasSprite, Integer> spriteMap = new HashMap<TextureAtlasSprite, Integer>() {{ + put(Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("minecraft:blocks/stonebrick_cracked"), + SpecialColour.specialToChromaRGB(NotEnoughUpdates.INSTANCE.config.dungeons.dungCrackedColour)); + put(Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("minecraft:blocks/dispenser_front_horizontal"), + SpecialColour.specialToChromaRGB(NotEnoughUpdates.INSTANCE.config.dungeons.dungDispenserColour)); + put(Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("minecraft:blocks/lever"), + SpecialColour.specialToChromaRGB(NotEnoughUpdates.INSTANCE.config.dungeons.dungLeverColour)); + put(Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite("minecraft:blocks/trip_wire"), + SpecialColour.specialToChromaRGB(NotEnoughUpdates.INSTANCE.config.dungeons.dungTripWireColour)); + }}; for (Map.Entry<TextureAtlasSprite, Integer> entry : spriteMap.entrySet()) { if (((entry.getValue() >> 24) & 0xFF) < 10) continue; 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 c3dc3244..bdf6647b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java @@ -50,7 +50,6 @@ import java.util.List; import java.util.*; public class DungeonMap { - private static final ResourceLocation GREEN_CHECK = new ResourceLocation("notenoughupdates:dungeon_map/green_check.png"); private static final ResourceLocation WHITE_CHECK = new ResourceLocation("notenoughupdates:dungeon_map/white_check.png"); private static final ResourceLocation QUESTION = new ResourceLocation("notenoughupdates:dungeon_map/question.png"); @@ -1583,5 +1582,4 @@ public class DungeonMap { projMatrix.m23 = -1.0001999F; return projMatrix; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java index b92318e8..21427e47 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java @@ -22,7 +22,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class DungeonWin { - private static class Confetti { private float x; private float y; @@ -418,5 +417,4 @@ public class DungeonWin { GlStateManager.enableBlend(); } - } 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 475e89e9..0e8fe327 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java @@ -35,7 +35,6 @@ import java.util.*; import static io.github.moulberry.notenoughupdates.util.GuiTextures.*;
public class GuiDungeonMapEditor extends GuiScreen {
-
public static final ResourceLocation BACKGROUND = new ResourceLocation("notenoughupdates:dungeon_map/editor/background.png");
public static final ResourceLocation BUTTON = new ResourceLocation("notenoughupdates:dungeon_map/editor/button.png");
private static final DungeonMap demoMap = new DungeonMap();
@@ -508,8 +507,7 @@ public class GuiDungeonMapEditor extends GuiScreen { NotEnoughUpdates.INSTANCE.colourMap, decorations, 0,
players, false, 0);
Utils.pushGuiScale(-1);
- }, () -> {
- }, () -> NotEnoughUpdates.INSTANCE.openGui = new GuiDungeonMapEditor()
+ }, () -> {}, () -> NotEnoughUpdates.INSTANCE.openGui = new GuiDungeonMapEditor()
).withScale(2));
return;
}
@@ -753,5 +751,4 @@ public class GuiDungeonMapEditor extends GuiScreen { Utils.drawTexturedRect(x, y, blurWidth, blurHeight, uMin, uMax, vMin, vMax);
blurOutputVert.unbindFramebufferTexture();
}
-
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/gamemodes/GuiGamemodes.java b/src/main/java/io/github/moulberry/notenoughupdates/gamemodes/GuiGamemodes.java index 184f1ed0..b02ef127 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/gamemodes/GuiGamemodes.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/gamemodes/GuiGamemodes.java @@ -18,7 +18,6 @@ import java.util.List; import static io.github.moulberry.notenoughupdates.util.GuiTextures.*; public class GuiGamemodes extends GuiScreen { - private final String currentProfile; private SBGamemodes.Gamemode currentGamemode = null; private final boolean upgradeOverride; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/gamemodes/SBGamemodes.java b/src/main/java/io/github/moulberry/notenoughupdates/gamemodes/SBGamemodes.java index 13d44d14..1726a4de 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/gamemodes/SBGamemodes.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/gamemodes/SBGamemodes.java @@ -25,7 +25,6 @@ import java.util.Base64; import java.util.HashMap; public class SBGamemodes { - private static final Gson gson = new Gson(); public static final int MODIFIER_DEVILISH = 0b1; @@ -341,5 +340,4 @@ public class SBGamemodes { } } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/CollectionLogInfoPane.java b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/CollectionLogInfoPane.java index d8e4ef68..700d98d9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/CollectionLogInfoPane.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/CollectionLogInfoPane.java @@ -26,7 +26,6 @@ import java.util.concurrent.atomic.AtomicReference; import static io.github.moulberry.notenoughupdates.util.GuiTextures.item_mask; public class CollectionLogInfoPane extends ScrollableInfoPane { - private final String mobRegex = ".*?((_MONSTER)|(_ANIMAL)|(_MINIBOSS)|(_BOSS)|(_SC))$"; private final String petRegex = ".*?;[0-4]$"; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java index 4c17b8d7..a848c999 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java @@ -29,12 +29,10 @@ import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.atomic.AtomicBoolean; +/** + * Provides some dev functions used to help with adding new items/detecting missing items. + */ public class DevInfoPane extends TextInfoPane { - - /** - * Provides some dev functions used to help with adding new items/detecting missing items. - */ - public DevInfoPane(NEUOverlay overlay, NEUManager manager) { super(overlay, manager, "Missing Items", ""); text = getText(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/FlipperInfoPane.java b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/FlipperInfoPane.java index 2626bcad..c167e9c8 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/FlipperInfoPane.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/FlipperInfoPane.java @@ -16,12 +16,10 @@ import static io.github.moulberry.notenoughupdates.itemeditor.GuiElementTextFiel import static io.github.moulberry.notenoughupdates.util.GuiTextures.off; import static io.github.moulberry.notenoughupdates.util.GuiTextures.on; +/** + * Not currently used + */ public class FlipperInfoPane extends InfoPane { - - /** - * Not currently used in BETA-1.6 - */ - protected String title; protected String text; @@ -87,9 +85,7 @@ public class FlipperInfoPane extends InfoPane { Utils.drawTexturedRect(x, y, 48, 16); } - public void mouseInput(int width, int height, int mouseX, int mouseY, boolean mouseDown) { - - } + public void mouseInput(int width, int height, int mouseX, int mouseY, boolean mouseDown) {} public boolean keyboardInput() { return false; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/HTMLInfoPane.java b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/HTMLInfoPane.java index 4ce581a6..de6558bd 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/HTMLInfoPane.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/HTMLInfoPane.java @@ -36,7 +36,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; public class HTMLInfoPane extends TextInfoPane { - private static final WikiModel wikiModel; private final int ZOOM_FACTOR = 2; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/InfoPane.java b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/InfoPane.java index 3ceb0425..95fad767 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/InfoPane.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/InfoPane.java @@ -11,7 +11,6 @@ import java.awt.*; import java.util.concurrent.CompletableFuture; public abstract class InfoPane extends Gui { - final NEUOverlay overlay; final NEUManager manager; @@ -65,5 +64,4 @@ public abstract class InfoPane extends Gui { new TextInfoPane(overlay, manager, name, infoText)); } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/ScrollableInfoPane.java b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/ScrollableInfoPane.java index fd10d707..3ea4d15d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/ScrollableInfoPane.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/ScrollableInfoPane.java @@ -6,7 +6,6 @@ import io.github.moulberry.notenoughupdates.core.util.lerp.LerpingInteger; import org.lwjgl.input.Mouse; public abstract class ScrollableInfoPane extends InfoPane { - private static final int SCROLL_AMOUNT = 50; protected LerpingInteger scrollHeight = new LerpingInteger(0); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/TextInfoPane.java b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/TextInfoPane.java index 1761abb3..663c1115 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/TextInfoPane.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/TextInfoPane.java @@ -10,7 +10,6 @@ import net.minecraft.client.gui.ScaledResolution; import java.awt.*; public class TextInfoPane extends ScrollableInfoPane { - protected String title; protected String text; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElement.java b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElement.java index 326e94a6..ac706ab5 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElement.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElement.java @@ -3,7 +3,6 @@ package io.github.moulberry.notenoughupdates.itemeditor; import net.minecraft.client.gui.Gui; public abstract class GuiElement extends Gui { - public abstract void render(int x, int y); public abstract int getWidth(); @@ -17,5 +16,4 @@ public abstract class GuiElement extends Gui { public void otherComponentClick() {} public void keyTyped(char typedChar, int keyCode) {} - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementButton.java b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementButton.java index 017b61c9..21f0fad3 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementButton.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementButton.java @@ -3,7 +3,6 @@ package io.github.moulberry.notenoughupdates.itemeditor; import java.awt.*; public class GuiElementButton extends GuiElementText { - private final Runnable callback; public GuiElementButton(String text, int colour, Runnable callback) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementText.java b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementText.java index 659d6859..6acb0772 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementText.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementText.java @@ -4,7 +4,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; public class GuiElementText extends GuiElement { - protected String text; private final int colour; @@ -38,5 +37,4 @@ public class GuiElementText extends GuiElement { fr.drawString(text, x, y + 6, colour); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementTextField.java b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementTextField.java index 0d2ef232..962cb53c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementTextField.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/GuiElementTextField.java @@ -13,7 +13,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class GuiElementTextField extends GuiElement { - public static final int SCALE_TEXT = 0b100000; public static final int NUM_ONLY = 0b10000; public static final int NO_SPACE = 0b01000; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java index 165e30a5..4b143e2f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java @@ -30,7 +30,6 @@ import java.util.function.Supplier; import static io.github.moulberry.notenoughupdates.itemeditor.GuiElementTextField.*; public class NEUItemEditor extends GuiScreen { - private final NEUManager manager; private final List<GuiElement> options = new ArrayList<>(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBAnchorPoint.java b/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBAnchorPoint.java index 27a2991d..7d4b3b11 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBAnchorPoint.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBAnchorPoint.java @@ -5,7 +5,6 @@ import org.lwjgl.util.vector.Vector2f; import java.io.Serializable; public class MBAnchorPoint implements Serializable { - public enum AnchorPoint { TOPLEFT(0, 0), TOPMID(0.5f, 0), TOPRIGHT(1, 0), MIDRIGHT(1, 0.5f), BOTRIGHT(1, 1), BOTMID(0.5f, 1), diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBDeserializer.java b/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBDeserializer.java index 8f7d1bc0..06a7f5aa 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBDeserializer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBDeserializer.java @@ -5,7 +5,6 @@ import com.google.gson.JsonObject; import java.io.IOException; public class MBDeserializer { - public static MBGuiElement deserialize(JsonObject json) { return null; } @@ -16,5 +15,4 @@ public class MBDeserializer { File file = new File(NotEnoughUpdates.INSTANCE.manager.configLocation, filename+".json"); NotEnoughUpdates.INSTANCE.manager.writeJson(json, file);*/ } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiElement.java b/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiElement.java index 2b7e879e..b0750d1c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiElement.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiElement.java @@ -1,7 +1,6 @@ package io.github.moulberry.notenoughupdates.mbgui; public abstract class MBGuiElement { - public abstract int getWidth(); public abstract int getHeight(); @@ -15,5 +14,4 @@ public abstract class MBGuiElement { public abstract void render(float x, float y); //public abstract JsonObject serialize(); - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroup.java b/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroup.java index 9b27f229..3582a549 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroup.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroup.java @@ -8,7 +8,6 @@ import java.util.HashMap; import java.util.Map; public abstract class MBGuiGroup extends MBGuiElement { - public int width; public int height; protected HashMap<MBGuiElement, Vector2f> childrenPosition = new HashMap<>(); @@ -61,5 +60,4 @@ public abstract class MBGuiGroup extends MBGuiElement { child.render(x + childPos.x, y + childPos.y); } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroupAligned.java b/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroupAligned.java index 42e18b82..c6a9e8ee 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroupAligned.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroupAligned.java @@ -6,7 +6,6 @@ import java.util.Collection; import java.util.List; public abstract class MBGuiGroupAligned extends MBGuiGroup { - //Serialized private final List<MBGuiElement> children; private final boolean vertical; @@ -61,7 +60,5 @@ public abstract class MBGuiGroupAligned extends MBGuiGroup { } } } - } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroupFloating.java b/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroupFloating.java index 8a25124f..125d2f99 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroupFloating.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroupFloating.java @@ -13,7 +13,6 @@ import org.lwjgl.util.vector.Vector2f; import java.util.*; public class MBGuiGroupFloating extends MBGuiGroup { - private GuiScreen lastScreen = null; private final HashMap<MBGuiElement, Vector2f> childrenPositionOffset = new HashMap<>(); @@ -58,8 +57,7 @@ public class MBGuiGroupFloating extends MBGuiGroup { ySize = (int) Utils.getField(GuiContainer.class, currentContainer, "ySize", "field_147000_g"); guiLeft = (int) Utils.getField(GuiContainer.class, currentContainer, "guiLeft", "field_147003_i"); guiTop = (int) Utils.getField(GuiContainer.class, currentContainer, "guiTop", "field_147009_r"); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } else if (currentScreen instanceof GuiItemRecipe) { xSize = ((GuiItemRecipe) currentScreen).xSize; ySize = ((GuiItemRecipe) currentScreen).ySize; @@ -133,5 +131,4 @@ public class MBGuiGroupFloating extends MBGuiGroup { public Collection<MBGuiElement> getChildren() { return children.keySet(); } - } 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 6f8a9a3e..1b418b86 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/AuctionBINWarning.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/AuctionBINWarning.java @@ -24,7 +24,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class AuctionBINWarning extends GuiElement { - private static final AuctionBINWarning INSTANCE = new AuctionBINWarning(); public static AuctionBINWarning getInstance() { @@ -237,5 +236,4 @@ public class AuctionBINWarning extends GuiElement { return false; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/AuctionSortModeWarning.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/AuctionSortModeWarning.java index e96555a0..ce2edcf6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/AuctionSortModeWarning.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/AuctionSortModeWarning.java @@ -13,7 +13,6 @@ import net.minecraft.item.ItemStack; import java.util.List; public class AuctionSortModeWarning { - private static final AuctionSortModeWarning INSTANCE = new AuctionSortModeWarning(); public static AuctionSortModeWarning getInstance() { @@ -71,5 +70,4 @@ public class AuctionSortModeWarning { } } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/BetterContainers.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/BetterContainers.java index 630cf3dd..d8c0db24 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/BetterContainers.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/BetterContainers.java @@ -28,7 +28,6 @@ import java.nio.charset.StandardCharsets; import java.util.HashMap; public class BetterContainers { - private static final ResourceLocation TOGGLE_OFF = new ResourceLocation("notenoughupdates:dynamic_54/toggle_off.png"); private static final ResourceLocation TOGGLE_ON = new ResourceLocation("notenoughupdates:dynamic_54/toggle_on.png"); @@ -472,5 +471,4 @@ public class BetterContainers { return 0; } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CollectionLogManager.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CollectionLogManager.java index 54700927..edfc0f7f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CollectionLogManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CollectionLogManager.java @@ -10,7 +10,6 @@ import net.minecraft.entity.item.EntityArmorStand; import java.util.regex.Matcher; public class CollectionLogManager { - private static final CollectionLogManager INSTANCE = new CollectionLogManager(); public static CollectionLogManager getInstance() { @@ -42,5 +41,4 @@ public class CollectionLogManager { } } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalOverlay.java index 9a1b82d4..a9c148a0 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalOverlay.java @@ -30,7 +30,6 @@ import java.util.List; import java.util.Set; public class CrystalOverlay { - private enum CrystalType { FARMING_MINION(8, 0xDAA520), MINING_MINION(40, 0x6e5a49), @@ -111,14 +110,12 @@ public class CrystalOverlay { private static double posLastUpdateY; private static double posLastUpdateZ; - private static final HashMap<String, CrystalType> skullId = new HashMap<>(); - - static { - skullId.put("d9c3168a-8654-3dd8-b297-4d3b7e55b95a", CrystalType.FARMING_MINION); - skullId.put("949d100c-aa74-3b09-a642-af5529f808aa", CrystalType.MINING_MINION); - skullId.put("bd79a474-cf07-3f8c-b5a4-98657c33520a", CrystalType.FORAGING_MINION); - skullId.put("2e474ee3-5361-3218-84db-880eb1cface1", CrystalType.FISHING); - } + private static final HashMap<String, CrystalType> skullId = new HashMap<String, CrystalType>() {{ + put("d9c3168a-8654-3dd8-b297-4d3b7e55b95a", CrystalType.FARMING_MINION); + put("949d100c-aa74-3b09-a642-af5529f808aa", CrystalType.MINING_MINION); + put("bd79a474-cf07-3f8c-b5a4-98657c33520a", CrystalType.FORAGING_MINION); + put("2e474ee3-5361-3218-84db-880eb1cface1", CrystalType.FISHING); + }}; public static long displayMillis = 0; @@ -366,5 +363,4 @@ public class CrystalOverlay { worldrenderer.pos(p_181561_0_.minX, p_181561_0_.maxY, p_181561_0_.maxZ) .color(c.getRed() / 255f * 0.9f, c.getGreen() / 255f * 0.9f, c.getBlue() / 255f * 0.9f, c.getAlpha() / 255f * alpha).endVertex(); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java index 78777538..9e860f95 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java @@ -42,7 +42,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class CustomItemEffects { - public static final CustomItemEffects INSTANCE = new CustomItemEffects(); private static final int MAX_BUILDERS_BLOCKS = 241; @@ -478,36 +477,33 @@ public class CustomItemEffects { return false; } - private static final List<BlockPos> zapperOffsets = new ArrayList<>(); - - static { - zapperOffsets.add(new BlockPos(0, 0, -1)); - zapperOffsets.add(new BlockPos(0, 0, 1)); - zapperOffsets.add(new BlockPos(-1, 0, 0)); - zapperOffsets.add(new BlockPos(1, 0, 0)); - zapperOffsets.add(new BlockPos(0, 1, 0)); - zapperOffsets.add(new BlockPos(0, -1, 0)); - } - - private static final HashSet<Block> cropBlocksZapper = new HashSet<>(); - private static final HashSet<Block> otherBannedBlocksZapper = new HashSet<>(); - - static { - cropBlocksZapper.add(Blocks.wheat); - cropBlocksZapper.add(Blocks.carrots); - cropBlocksZapper.add(Blocks.potatoes); - cropBlocksZapper.add(Blocks.pumpkin); - cropBlocksZapper.add(Blocks.pumpkin_stem); - cropBlocksZapper.add(Blocks.melon_block); - cropBlocksZapper.add(Blocks.melon_stem); - cropBlocksZapper.add(Blocks.cactus); - cropBlocksZapper.add(Blocks.reeds); - cropBlocksZapper.add(Blocks.nether_wart); - cropBlocksZapper.add(Blocks.tallgrass); - cropBlocksZapper.add(Blocks.double_plant); - - otherBannedBlocksZapper.add(Blocks.farmland); - } + private static final List<BlockPos> zapperOffsets = new ArrayList<BlockPos>() {{ + add(new BlockPos(0, 0, -1)); + add(new BlockPos(0, 0, 1)); + add(new BlockPos(-1, 0, 0)); + add(new BlockPos(1, 0, 0)); + add(new BlockPos(0, 1, 0)); + add(new BlockPos(0, -1, 0)); + }}; + + private static final HashSet<Block> cropBlocksZapper = new HashSet<Block>() {{ + add(Blocks.wheat); + add(Blocks.carrots); + add(Blocks.potatoes); + add(Blocks.pumpkin); + add(Blocks.pumpkin_stem); + add(Blocks.melon_block); + add(Blocks.melon_stem); + add(Blocks.cactus); + add(Blocks.reeds); + add(Blocks.nether_wart); + add(Blocks.tallgrass); + add(Blocks.double_plant); + }}; + + private static final HashSet<Block> otherBannedBlocksZapper = new HashSet<Block>() {{ + add(Blocks.farmland); + }}; @SubscribeEvent public void renderBlockOverlay(DrawBlockHighlightEvent event) { @@ -1204,5 +1200,4 @@ public class CustomItemEffects { GL11.glLineWidth(1); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomSkulls.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomSkulls.java index 81fc62ac..f4ccf0ad 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomSkulls.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomSkulls.java @@ -34,7 +34,6 @@ import java.nio.charset.StandardCharsets; import java.util.*; public class CustomSkulls implements IResourceManagerReloadListener { - private static final CustomSkulls INSTANCE = new CustomSkulls(); public static CustomSkulls getInstance() { @@ -283,5 +282,4 @@ public class CustomSkulls implements IResourceManagerReloadListener { return true; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java index 5f3a5afa..ba12235d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java @@ -14,7 +14,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class DamageCommas { - private static final WeakHashMap<EntityLivingBase, ChatComponentText> replacementMap = new WeakHashMap<>(); private static final EnumChatFormatting[] coloursHypixel = {EnumChatFormatting.WHITE, EnumChatFormatting.YELLOW, EnumChatFormatting.GOLD, EnumChatFormatting.RED, EnumChatFormatting.RED, EnumChatFormatting.WHITE}; @@ -129,8 +128,7 @@ public class DamageCommas { ChatComponentText ret = new ChatComponentText("\u00A7f\u2727" + colouredString + "\u00a7r\u2727\u00a7r"); replacementMap.put(hashCode, ret); return ret; - } catch (NumberFormatException ignored) { - } + } catch (NumberFormatException ignored) {} } StringBuilder builder = new StringBuilder(); @@ -200,5 +198,4 @@ public class DamageCommas { replacementMap.put(hashCode, null); return name;*/ } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java index 8be1fae8..58ea414f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java @@ -27,7 +27,6 @@ import java.util.Map; import java.util.Set; public class DwarvenMinesTextures { - private static class IgnoreColumn { boolean always; int minY; @@ -395,9 +394,7 @@ public class DwarvenMinesTextures { } } } - } }*/ } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java index 629b42d6..a48051b8 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java @@ -29,44 +29,40 @@ import java.util.regex.Pattern; public class DwarvenMinesWaypoints { - private final HashMap<String, Vector3f> waypointsMap = new HashMap<>(); + private final HashMap<String, Vector3f> waypointsMap = new HashMap<String, Vector3f>() {{ + put("Dwarven Village", new Vector3f(-37, 199, -122)); + put("Miner's Guild", new Vector3f(-74, 220, -122)); + put("Fetchur", new Vector3f(85, 223, -120)); + put("Palace Bridge", new Vector3f(129, 186, 8)); + put("Royal Palace", new Vector3f(129, 194, 194)); + put("Puzzler", new Vector3f(181, 195, 135)); + put("Grand Library", new Vector3f(183, 195, 181)); + put("Barracks of Heroes", new Vector3f(93, 195, 181)); + put("Royal Mines", new Vector3f(178, 149, 71)); + put("Cliffside Veins", new Vector3f(40, 136, 17)); + put("Forge Basin", new Vector3f(0, 169, -2)); + put("The Forge", new Vector3f(0, 148, -69)); + put("Rampart's Quarry", new Vector3f(-106, 147, 2)); + put("Far Reserve", new Vector3f(-160, 148, 17)); + put("Upper Mines", new Vector3f(-123, 170, -71)); + put("Goblin Burrows", new Vector3f(-138, 143, 141)); + put("Great Ice Wall", new Vector3f(0, 127, 160)); + put("Aristocrat Passage", new Vector3f(129, 150, 137)); + put("Hanging Court", new Vector3f(91, 186, 129)); + put("Divan's Gateway", new Vector3f(0, 127, 87)); + put("Lava Springs", new Vector3f(57, 196, -15)); + put("The Mist", new Vector3f(0, 75, 82)); + }}; - { - waypointsMap.put("Dwarven Village", new Vector3f(-37, 199, -122)); - waypointsMap.put("Miner's Guild", new Vector3f(-74, 220, -122)); - waypointsMap.put("Fetchur", new Vector3f(85, 223, -120)); - waypointsMap.put("Palace Bridge", new Vector3f(129, 186, 8)); - waypointsMap.put("Royal Palace", new Vector3f(129, 194, 194)); - waypointsMap.put("Puzzler", new Vector3f(181, 195, 135)); - waypointsMap.put("Grand Library", new Vector3f(183, 195, 181)); - waypointsMap.put("Barracks of Heroes", new Vector3f(93, 195, 181)); - waypointsMap.put("Royal Mines", new Vector3f(178, 149, 71)); - waypointsMap.put("Cliffside Veins", new Vector3f(40, 136, 17)); - waypointsMap.put("Forge Basin", new Vector3f(0, 169, -2)); - waypointsMap.put("The Forge", new Vector3f(0, 148, -69)); - waypointsMap.put("Rampart's Quarry", new Vector3f(-106, 147, 2)); - waypointsMap.put("Far Reserve", new Vector3f(-160, 148, 17)); - waypointsMap.put("Upper Mines", new Vector3f(-123, 170, -71)); - waypointsMap.put("Goblin Burrows", new Vector3f(-138, 143, 141)); - waypointsMap.put("Great Ice Wall", new Vector3f(0, 127, 160)); - waypointsMap.put("Aristocrat Passage", new Vector3f(129, 150, 137)); - waypointsMap.put("Hanging Court", new Vector3f(91, 186, 129)); - waypointsMap.put("Divan's Gateway", new Vector3f(0, 127, 87)); - waypointsMap.put("Lava Springs", new Vector3f(57, 196, -15)); - waypointsMap.put("The Mist", new Vector3f(0, 75, 82)); - } - - private static final HashSet<String> emissaryNames = new HashSet<>(); - - static { - emissaryNames.add(EnumChatFormatting.GOLD + "Emissary Ceanna" + EnumChatFormatting.RESET); - emissaryNames.add(EnumChatFormatting.GOLD + "Emissary Carlton" + EnumChatFormatting.RESET); - emissaryNames.add(EnumChatFormatting.GOLD + "Emissary Wilson" + EnumChatFormatting.RESET); - emissaryNames.add(EnumChatFormatting.GOLD + "Emissary Lilith" + EnumChatFormatting.RESET); - emissaryNames.add(EnumChatFormatting.GOLD + "Emissary Frasier" + EnumChatFormatting.RESET); - emissaryNames.add(EnumChatFormatting.GOLD + "Emissary Eliza" + EnumChatFormatting.RESET); - emissaryNames.add(EnumChatFormatting.GOLD.toString() + EnumChatFormatting.BOLD + "King Thormyr" + EnumChatFormatting.RESET); - } + private static final HashSet<String> emissaryNames = new HashSet<String>() {{ + add(EnumChatFormatting.GOLD + "Emissary Ceanna" + EnumChatFormatting.RESET); + add(EnumChatFormatting.GOLD + "Emissary Carlton" + EnumChatFormatting.RESET); + add(EnumChatFormatting.GOLD + "Emissary Wilson" + EnumChatFormatting.RESET); + add(EnumChatFormatting.GOLD + "Emissary Lilith" + EnumChatFormatting.RESET); + add(EnumChatFormatting.GOLD + "Emissary Frasier" + EnumChatFormatting.RESET); + add(EnumChatFormatting.GOLD + "Emissary Eliza" + EnumChatFormatting.RESET); + add(EnumChatFormatting.GOLD.toString() + EnumChatFormatting.BOLD + "King Thormyr" + EnumChatFormatting.RESET); + }}; private enum Emissary { THORMYR("King Thormyr", 0, new Vector3f(129, 196, 196)), @@ -256,9 +252,7 @@ public class DwarvenMinesWaypoints { } } } - } } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java index 15eb7102..70ebc76f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java @@ -21,7 +21,6 @@ import net.minecraftforge.fml.common.gameevent.TickEvent; import java.util.*; public class EnchantingSolvers { - private static SolverType currentSolver = SolverType.NONE; private enum SolverType { @@ -31,12 +30,11 @@ public class EnchantingSolvers { SUPERPAIRS } - private static final NBTTagCompound enchTag = new NBTTagCompound(); - static { - enchTag.setTag("ench", new NBTTagList()); - } + private static final NBTTagCompound enchTag = new NBTTagCompound() {{ + setTag("ench", new NBTTagList()); + }}; - //Chronomatron + // Chronomatron private static boolean addToChronomatron = false; private static boolean chronomatronStartSeq = false; private static final List<String> chronomatronOrder = new ArrayList<>(); @@ -44,7 +42,7 @@ public class EnchantingSolvers { private static int lastChronomatronSize = 0; private static long millisLastClick = 0; - //Ultrasequencer + // Ultrasequencer private static class UltrasequencerItem { ItemStack stack; int containerIndex; @@ -58,7 +56,7 @@ public class EnchantingSolvers { private static final Map<Integer, UltrasequencerItem> ultraSequencerOrder = new HashMap<>(); private static int ultrasequencerReplayIndex = 0; - //Superpairs + // Superpairs private static final Map<Integer, ItemStack> superpairStacks = new HashMap<>(); private static int lastSlotClicked = -1; private static final HashSet<Integer> successfulMatches = new HashSet<>(); @@ -551,5 +549,4 @@ public class EnchantingSolvers { processInventoryContents(true); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java index 8d611845..9e219852 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java @@ -27,7 +27,6 @@ import java.util.*; import java.util.stream.Collectors; public class FairySouls { - private static final String unknownProfile = "unknown"; private static List<BlockPos> currentSoulList = null; private static List<BlockPos> currentSoulListClose = null; @@ -147,15 +146,13 @@ public class FairySouls { try { //noinspection UnstableApiUsage - Type multiProfileSoulsType = new TypeToken<HashMap<String, HashMap<String, Set<Integer>>>>() { - }.getType(); + Type multiProfileSoulsType = new TypeToken<HashMap<String, HashMap<String, Set<Integer>>>>() {}.getType(); loadedFoundSouls = gson.fromJson(fileContent, multiProfileSoulsType); } catch (JsonSyntaxException e) { //The file is in the old format, convert it to the new one and set the profile to unknown try { //noinspection UnstableApiUsage - Type singleProfileSoulsType = new TypeToken<HashMap<String, Set<Integer>>>() { - }.getType(); + Type singleProfileSoulsType = new TypeToken<HashMap<String, Set<Integer>>>() {}.getType(); loadedFoundSouls.put(unknownProfile, gson.fromJson(fileContent, singleProfileSoulsType)); } catch (JsonSyntaxException e2) { System.err.println("Can't read file containing collected fairy souls, resetting."); @@ -171,8 +168,7 @@ public class FairySouls { try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8))) { writer.write(gson.toJson(loadedFoundSouls)); } - } catch (IOException ignored) { - } + } catch (IOException ignored) {} } public static void tick() { @@ -212,8 +208,7 @@ public class FairySouls { currentSoulList.add(new BlockPos(x, y, z)); } - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } } } @@ -322,5 +317,4 @@ public class FairySouls { super("neusouls", fairysoulRunnable); } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FancyPortals.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FancyPortals.java index cb946426..941ef0af 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FancyPortals.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FancyPortals.java @@ -26,7 +26,6 @@ import java.nio.ByteBuffer; import java.util.List; public class FancyPortals { - private static final ResourceLocation[] RENDERS = new ResourceLocation[6]; static { @@ -291,5 +290,4 @@ public class FancyPortals { GL11.glDisable(GL11.GL_STENCIL_TEST); GlStateManager.enableCull(); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FishingHelper.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FishingHelper.java index 94e308a1..fdd3d704 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FishingHelper.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FishingHelper.java @@ -24,7 +24,6 @@ import org.lwjgl.opengl.GL11; import java.util.*; public class FishingHelper { - private static final FishingHelper INSTANCE = new FishingHelper(); public static FishingHelper getInstance() { @@ -131,7 +130,6 @@ public class FishingHelper { lastCastRodMillis = currentTime; } } - } } @@ -587,5 +585,4 @@ public class FishingHelper { return false; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java index 8edc97c8..bb5df60c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java @@ -18,7 +18,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class ItemCooldowns { - private static final Map<ItemStack, Float> durabilityOverrideMap = new HashMap<>(); public static long pickaxeUseCooldownMillisRemaining = -1; private static long treecapitatorCooldownMillisRemaining = -1; @@ -203,5 +202,4 @@ public class ItemCooldowns { durabilityOverrideMap.put(stack, -1f); return -1; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCustomizeManager.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCustomizeManager.java index a67bb5d6..0e35ace9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCustomizeManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCustomizeManager.java @@ -24,7 +24,6 @@ import java.util.HashMap; import java.util.function.Consumer; public class ItemCustomizeManager { - public static class ReloadListener implements IResourceManagerReloadListener { @Override public void onResourceManagerReload(IResourceManager resourceManager) { @@ -274,5 +273,4 @@ public class ItemCustomizeManager { } } catch (Exception ignored) {} } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemRarityHalo.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemRarityHalo.java index d0716c3c..931f677f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemRarityHalo.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemRarityHalo.java @@ -25,7 +25,6 @@ import java.nio.IntBuffer; import java.util.HashMap; public class ItemRarityHalo { - public static Framebuffer itemFramebuffer1 = null; public static Framebuffer itemFramebuffer2 = null; public static HashMap<ItemStack, Integer> itemHaloTexMap = new HashMap<>(); @@ -256,5 +255,4 @@ public class ItemRarityHalo { shader.framebufferOut.unbindFramebuffer(); shader.framebufferIn.unbindFramebufferTexture(); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/MiningStuff.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/MiningStuff.java index 390b36ef..2d681bc3 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/MiningStuff.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/MiningStuff.java @@ -26,7 +26,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import java.util.Map; public class MiningStuff { - private static BlockPos overlayLoc = null; private static long titaniumNotifMillis = 0; private static Minecraft mc; @@ -165,7 +164,7 @@ public class MiningStuff { } @SubscribeEvent - public void onChatRecevied(ClientChatReceivedEvent event) { + public void onChatReceived(ClientChatReceivedEvent event) { if (!NotEnoughUpdates.INSTANCE.config.mining.puzzlerSolver) { overlayLoc = null; return; @@ -197,5 +196,4 @@ public class MiningStuff { overlayLoc = pos; } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/NPCRetexturing.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/NPCRetexturing.java index 19dca439..119e3119 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/NPCRetexturing.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/NPCRetexturing.java @@ -18,7 +18,6 @@ import java.util.HashMap; import java.util.Map; public class NPCRetexturing implements IResourceManagerReloadListener { - private static final NPCRetexturing INSTANCE = new NPCRetexturing(); private static final ResourceLocation npcRetexturingJson = new ResourceLocation("notenoughupdates:npccustomtextures/config.json"); @@ -91,5 +90,4 @@ public class NPCRetexturing implements IResourceManagerReloadListener { public static NPCRetexturing getInstance() { return INSTANCE; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/NullzeeSphere.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/NullzeeSphere.java index 5a6d9532..03c8c28d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/NullzeeSphere.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/NullzeeSphere.java @@ -23,7 +23,6 @@ import java.util.List; import java.util.Set; public class NullzeeSphere { - public static boolean enabled = false; public static float size = 20; public static BlockPos centerPos = new BlockPos(0, 0, 0); @@ -230,5 +229,4 @@ public class NullzeeSphere { worldrenderer.pos(p_181561_0_.minX, p_181561_0_.maxY, p_181561_0_.maxZ) .color(c.getRed() / 255f * 0.9f, c.getGreen() / 255f * 0.9f, c.getBlue() / 255f * 0.9f, c.getAlpha() / 255f * alpha).endVertex(); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java index 955fbbbd..9663868b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java @@ -44,7 +44,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class PetInfoOverlay extends TextOverlay { - private static final Pattern XP_BOOST_PATTERN = Pattern.compile("PET_ITEM_(COMBAT|FISHING|MINING|FORAGING|ALL|FARMING)_(SKILL|SKILLS)_BOOST_(COMMON|UNCOMMON|RARE|EPIC)"); private static final Pattern PET_CONTAINER_PAGE = Pattern.compile("\\((\\d)/(\\d)\\) Pets"); private static final Pattern PET_NAME_PATTERN = Pattern.compile("\u00a77\\[Lvl \\d+] \u00a7(.+)"); @@ -123,8 +122,7 @@ public class PetInfoOverlay extends TextOverlay { public static void loadConfig(File file) { try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8))) { config = GSON.fromJson(reader, PetConfig.class); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} if (config == null) { config = new PetConfig(); } @@ -191,12 +189,13 @@ public class PetInfoOverlay extends TextOverlay { } private static Pet getClosestPet(String petType, int petId, String petItem, float petLevel) { - Set<Pet> pets = new HashSet<>(); - for (Pet pet : config.petMap.values()) { - if (pet.petType.equals(petType) && pet.rarity.petId == petId) { - pets.add(pet); + Set<Pet> pets = new HashSet<Pet>() {{ + for (Pet pet : config.petMap.values()) { + if (pet.petType.equals(petType) && pet.rarity.petId == petId) { + add(pet); + } } - } + }}; if (pets == null || pets.isEmpty()) { return null; @@ -418,38 +417,40 @@ public class PetInfoOverlay extends TextOverlay { } } - List<String> strings = new ArrayList<>(); - - for (int index : NotEnoughUpdates.INSTANCE.config.petOverlay.petOverlayText) { - switch (index) { - case 0: - strings.add(petName); - break; - case 1: - strings.add(lvlStringShort); - break; - case 2: - strings.add(lvlString); - break; - case 3: - strings.add(xpGainString); - break; - case 4: - strings.add(totalXpString); - break; - case 5: - strings.add(petItemStr); - break; - case 6: - if (etaStr != null) strings.add(etaStr); - break; - case 7: - if (etaMaxStr != null) strings.add(etaMaxStr); - break; + String finalEtaStr = etaStr; + String finalEtaMaxStr = etaMaxStr; + String finalXpGainString = xpGainString; + String finalPetItemStr = petItemStr; + return new ArrayList<String>() {{ + for (int index : NotEnoughUpdates.INSTANCE.config.petOverlay.petOverlayText) { + switch (index) { + case 0: + add(petName); + break; + case 1: + add(lvlStringShort); + break; + case 2: + add(lvlString); + break; + case 3: + add(finalXpGainString); + break; + case 4: + add(totalXpString); + break; + case 5: + add(finalPetItemStr); + break; + case 6: + if (finalEtaStr != null) add(finalEtaStr); + break; + case 7: + if (finalEtaMaxStr != null) add(finalEtaMaxStr); + break; + } } - } - - return strings; + }}; } @Override @@ -1058,8 +1059,7 @@ public class PetInfoOverlay extends TextOverlay { @SubscribeEvent public void switchWorld(WorldEvent.Load event) { if (NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) { - ProfileApiSyncer.getInstance().requestResync("petinfo_quick", 10000, () -> { - }, PetInfoOverlay::getAndSetPet); + ProfileApiSyncer.getInstance().requestResync("petinfo_quick", 10000, () -> {}, PetInfoOverlay::getAndSetPet); } } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java index 3837cfe8..109a4430 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java @@ -35,7 +35,6 @@ import java.util.HashMap; import java.util.function.Consumer; public class SlotLocking { - private static final SlotLocking INSTANCE = new SlotLocking(); private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create(); @@ -615,5 +614,4 @@ public class SlotLocking { return locked != null && (locked.locked || (NotEnoughUpdates.INSTANCE.config.slotLocking.bindingAlsoLocks && locked.boundTo != -1)); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java index 1cc34412..d1cc8040 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java @@ -32,7 +32,6 @@ import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; public class StorageManager { - private static final StorageManager INSTANCE = new StorageManager(); private static final Gson GSON = new GsonBuilder() .registerTypeAdapter(ItemStack.class, new ItemStackSerializer()) @@ -40,8 +39,7 @@ public class StorageManager { public static class ItemStackSerializer implements JsonSerializer<ItemStack> { @Override - public JsonElement serialize(ItemStack src, Type typeOfSrc, - JsonSerializationContext context) { + public JsonElement serialize(ItemStack src, Type typeOfSrc, JsonSerializationContext context) { NBTTagCompound tag = src.serializeNBT(); return nbtToJson(tag); } @@ -51,8 +49,7 @@ public class StorageManager { public static class ItemStackDeserilizer implements JsonDeserializer<ItemStack> { @Override - public ItemStack deserialize(JsonElement json, Type typeOfT, - JsonDeserializationContext context) throws JsonParseException { + public ItemStack deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { try { JsonObject object = json.getAsJsonObject(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StreamerMode.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StreamerMode.java index ed08ebe2..8ed6ed29 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StreamerMode.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StreamerMode.java @@ -6,7 +6,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class StreamerMode { - private static final Pattern lobbyPattern = Pattern.compile("(mini|mega|m|M)([0-9]{1,3}[A-Z])"); public static String filterLobbyNames(String line) { @@ -33,5 +32,4 @@ public class StreamerMode { line = filterLobbyNames(line); return line; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SunTzu.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SunTzu.java index 90c59013..ead8fa83 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SunTzu.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SunTzu.java @@ -12,7 +12,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import java.util.Random; public class SunTzu { - private static boolean enabled = false; private static int quoteNum = 0; @@ -88,5 +87,4 @@ public class SunTzu { public void switchWorld(WorldEvent.Load event) { randomizeQuote(); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java index d3b24e2c..929176e3 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java @@ -40,7 +40,6 @@ import java.util.regex.Pattern; import static io.github.moulberry.notenoughupdates.util.GuiTextures.*; public class AccessoryBagOverlay { - private static final int TAB_BASIC = 0; private static final int TAB_TOTAL = 1; private static final int TAB_BONUS = 2; @@ -764,72 +763,39 @@ public class AccessoryBagOverlay { } }*/ - private static final String STAT_PATTERN_BONUS_END = ": (?:\\+|-)[0-9]+(?:\\.[0-9]+)?\\%? \\(((?:\\+|-)[0-9]+)%?"; - - private static final Pattern HEALTH_PATTERN_BONUS = Pattern.compile("^Health" + STAT_PATTERN_BONUS_END); - private static final Pattern DEFENCE_PATTERN_BONUS = Pattern.compile("^Defense" + STAT_PATTERN_BONUS_END); - private static final Pattern STRENGTH_PATTERN_BONUS = Pattern.compile("^Strength" + STAT_PATTERN_BONUS_END); - private static final Pattern SPEED_PATTERN_BONUS = Pattern.compile("^Speed" + STAT_PATTERN_BONUS_END); - private static final Pattern CC_PATTERN_BONUS = Pattern.compile("^Crit Chance" + STAT_PATTERN_BONUS_END); - private static final Pattern CD_PATTERN_BONUS = Pattern.compile("^Crit Damage" + STAT_PATTERN_BONUS_END); - private static final Pattern ATKSPEED_PATTERN_BONUS = Pattern.compile("^Bonus Attack Speed" + STAT_PATTERN_BONUS_END); - private static final Pattern INTELLIGENCE_PATTERN_BONUS = Pattern.compile("^Intelligence" + STAT_PATTERN_BONUS_END); - private static final Pattern SCC_PATTERN_BONUS = Pattern.compile("^Sea Creature Chance" + STAT_PATTERN_BONUS_END); - private static final Pattern FEROCITY_PATTERN_BONUS = Pattern.compile("^Ferocity" + STAT_PATTERN_BONUS_END); - private static final Pattern MINING_FORTUNE_PATTERN_BONUS = Pattern.compile("^Mining Fortune" + STAT_PATTERN_BONUS_END); - private static final Pattern MINING_SPEED_PATTERN_BONUS = Pattern.compile("^Mining Speed" + STAT_PATTERN_BONUS_END); - private static final Pattern MAGIC_FIND_PATTERN_BONUS = Pattern.compile("^Magic Find" + STAT_PATTERN_BONUS_END); - private static final HashMap<String, Pattern> STAT_PATTERN_MAP_BONUS = new HashMap<>(); - - static { - STAT_PATTERN_MAP_BONUS.put("health", HEALTH_PATTERN_BONUS); - STAT_PATTERN_MAP_BONUS.put("defence", DEFENCE_PATTERN_BONUS); - STAT_PATTERN_MAP_BONUS.put("strength", STRENGTH_PATTERN_BONUS); - STAT_PATTERN_MAP_BONUS.put("speed", SPEED_PATTERN_BONUS); - STAT_PATTERN_MAP_BONUS.put("crit_chance", CC_PATTERN_BONUS); - STAT_PATTERN_MAP_BONUS.put("crit_damage", CD_PATTERN_BONUS); - STAT_PATTERN_MAP_BONUS.put("bonus_attack_speed", ATKSPEED_PATTERN_BONUS); - STAT_PATTERN_MAP_BONUS.put("intelligence", INTELLIGENCE_PATTERN_BONUS); - STAT_PATTERN_MAP_BONUS.put("sea_creature_chance", SCC_PATTERN_BONUS); - STAT_PATTERN_MAP_BONUS.put("ferocity", FEROCITY_PATTERN_BONUS); - STAT_PATTERN_MAP_BONUS.put("mining_fortune", MINING_FORTUNE_PATTERN_BONUS); - STAT_PATTERN_MAP_BONUS.put("mining_speed", MINING_SPEED_PATTERN_BONUS); - STAT_PATTERN_MAP_BONUS.put("magic_find", MAGIC_FIND_PATTERN_BONUS); - } - - private static final String STAT_PATTERN_END = ": ((?:\\+|-)([0-9]+(\\.[0-9]+)?))%?"; - - private static final Pattern HEALTH_PATTERN = Pattern.compile("^Health" + STAT_PATTERN_END); - private static final Pattern DEFENCE_PATTERN = Pattern.compile("^Defense" + STAT_PATTERN_END); - private static final Pattern STRENGTH_PATTERN = Pattern.compile("^Strength" + STAT_PATTERN_END); - private static final Pattern SPEED_PATTERN = Pattern.compile("^Speed" + STAT_PATTERN_END); - private static final Pattern CC_PATTERN = Pattern.compile("^Crit Chance" + STAT_PATTERN_END); - private static final Pattern CD_PATTERN = Pattern.compile("^Crit Damage" + STAT_PATTERN_END); - private static final Pattern ATKSPEED_PATTERN = Pattern.compile("^Bonus Attack Speed" + STAT_PATTERN_END); - private static final Pattern INTELLIGENCE_PATTERN = Pattern.compile("^Intelligence" + STAT_PATTERN_END); - private static final Pattern SCC_PATTERN = Pattern.compile("^Sea Creature Chance" + STAT_PATTERN_END); - private static final Pattern FEROCITY_PATTERN = Pattern.compile("^Ferocity" + STAT_PATTERN_END); - private static final Pattern MINING_FORTUNE_PATTERN = Pattern.compile("^Mining Fortune" + STAT_PATTERN_END); - private static final Pattern MINING_SPEED_PATTERN = Pattern.compile("^Mining Speed" + STAT_PATTERN_END); - private static final Pattern MAGIC_FIND_PATTERN = Pattern.compile("^Magic Find" + STAT_PATTERN_END); - - private static final HashMap<String, Pattern> STAT_PATTERN_MAP = new HashMap<>(); - - static { - STAT_PATTERN_MAP.put("health", HEALTH_PATTERN); - STAT_PATTERN_MAP.put("defence", DEFENCE_PATTERN); - STAT_PATTERN_MAP.put("strength", STRENGTH_PATTERN); - STAT_PATTERN_MAP.put("speed", SPEED_PATTERN); - STAT_PATTERN_MAP.put("crit_chance", CC_PATTERN); - STAT_PATTERN_MAP.put("crit_damage", CD_PATTERN); - STAT_PATTERN_MAP.put("bonus_attack_speed", ATKSPEED_PATTERN); - STAT_PATTERN_MAP.put("intelligence", INTELLIGENCE_PATTERN); - STAT_PATTERN_MAP.put("sea_creature_chance", SCC_PATTERN); - STAT_PATTERN_MAP.put("ferocity", FEROCITY_PATTERN); - STAT_PATTERN_MAP.put("mining_fortune", MINING_FORTUNE_PATTERN); - STAT_PATTERN_MAP.put("mining_speed", MINING_SPEED_PATTERN); - STAT_PATTERN_MAP.put("magic_find", MAGIC_FIND_PATTERN); - } + private static final HashMap<String, Pattern> STAT_PATTERN_MAP_BONUS = new HashMap<String, Pattern>() {{ + String STAT_PATTERN_BONUS_END = ": (?:\\+|-)[0-9]+(?:\\.[0-9]+)?\\%? \\(((?:\\+|-)[0-9]+)%?"; + put("health", Pattern.compile("^Health" + STAT_PATTERN_BONUS_END)); + put("defence", Pattern.compile("^Defense" + STAT_PATTERN_BONUS_END)); + put("strength", Pattern.compile("^Strength" + STAT_PATTERN_BONUS_END)); + put("speed", Pattern.compile("^Speed" + STAT_PATTERN_BONUS_END)); + put("crit_chance", Pattern.compile("^Crit Chance" + STAT_PATTERN_BONUS_END)); + put("crit_damage", Pattern.compile("^Crit Damage" + STAT_PATTERN_BONUS_END)); + put("bonus_attack_speed", Pattern.compile("^Bonus Attack Speed" + STAT_PATTERN_BONUS_END)); + put("intelligence", Pattern.compile("^Intelligence" + STAT_PATTERN_BONUS_END)); + put("sea_creature_chance", Pattern.compile("^Sea Creature Chance" + STAT_PATTERN_BONUS_END)); + put("ferocity", Pattern.compile("^Ferocity" + STAT_PATTERN_BONUS_END)); + put("mining_fortune", Pattern.compile("^Mining Fortune" + STAT_PATTERN_BONUS_END)); + put("mining_speed", Pattern.compile("^Mining Speed" + STAT_PATTERN_BONUS_END)); + put("magic_find", Pattern.compile("^Magic Find" + STAT_PATTERN_BONUS_END)); + }}; + + private static final HashMap<String, Pattern> STAT_PATTERN_MAP = new HashMap<String, Pattern>() {{ + String STAT_PATTERN_END = ": ((?:\\+|-)([0-9]+(\\.[0-9]+)?))%?"; + put("health", Pattern.compile("^Health" + STAT_PATTERN_END)); + put("defence", Pattern.compile("^Defense" + STAT_PATTERN_END)); + put("strength", Pattern.compile("^Strength" + STAT_PATTERN_END)); + put("speed", Pattern.compile("^Speed" + STAT_PATTERN_END)); + put("crit_chance", Pattern.compile("^Crit Chance" + STAT_PATTERN_END)); + put("crit_damage", Pattern.compile("^Crit Damage" + STAT_PATTERN_END)); + put("bonus_attack_speed", Pattern.compile("^Bonus Attack Speed" + STAT_PATTERN_END)); + put("intelligence", Pattern.compile("^Intelligence" + STAT_PATTERN_END)); + put("sea_creature_chance", Pattern.compile("^Sea Creature Chance" + STAT_PATTERN_END)); + put("ferocity", Pattern.compile("^Ferocity" + STAT_PATTERN_END)); + put("mining_fortune", Pattern.compile("^Mining Fortune" + STAT_PATTERN_END)); + put("mining_speed", Pattern.compile("^Mining Speed" + STAT_PATTERN_END)); + put("magic_find", Pattern.compile("^Magic Find" + STAT_PATTERN_END)); + }}; private static PlayerStats.Stats getStatForItem(ItemStack stack, HashMap<String, Pattern> patternMap, boolean addExtras) { String internalname = NotEnoughUpdates.INSTANCE.manager.getInternalNameForItem(stack); @@ -898,20 +864,21 @@ public class AccessoryBagOverlay { return stats; } - // private static String[] rarityArr = new String[] { -// "COMMON", "UNCOMMON", "RARE", "EPIC", "LEGENDARY", "MYTHIC", "SPECIAL", "VERY SPECIAL", "SUPREME" -// }; -// private static String[] rarityArrC = new String[] { -// EnumChatFormatting.WHITE+EnumChatFormatting.BOLD.toString()+"COMMON", -// EnumChatFormatting.GREEN+EnumChatFormatting.BOLD.toString()+"UNCOMMON", -// EnumChatFormatting.BLUE+EnumChatFormatting.BOLD.toString()+"RARE", -// EnumChatFormatting.DARK_PURPLE+EnumChatFormatting.BOLD.toString()+"EPIC", -// EnumChatFormatting.GOLD+EnumChatFormatting.BOLD.toString()+"LEGENDARY", -// EnumChatFormatting.LIGHT_PURPLE+EnumChatFormatting.BOLD.toString()+"MYTHIC", -// EnumChatFormatting.RED+EnumChatFormatting.BOLD.toString()+"SPECIAL", -// EnumChatFormatting.RED+EnumChatFormatting.BOLD.toString()+"VERY SPECIAL", -// EnumChatFormatting.DARK_RED+EnumChatFormatting.BOLD.toString()+"SUPREME", -// }; + // private static String[] rarityArr = new String[] { + // "COMMON", "UNCOMMON", "RARE", "EPIC", "LEGENDARY", "MYTHIC", "SPECIAL", "VERY SPECIAL", "SUPREME" + // }; + // private static String[] rarityArrC = new String[] { + // EnumChatFormatting.WHITE+EnumChatFormatting.BOLD.toString()+"COMMON", + // EnumChatFormatting.GREEN+EnumChatFormatting.BOLD.toString()+"UNCOMMON", + // EnumChatFormatting.BLUE+EnumChatFormatting.BOLD.toString()+"RARE", + // EnumChatFormatting.DARK_PURPLE+EnumChatFormatting.BOLD.toString()+"EPIC", + // EnumChatFormatting.GOLD+EnumChatFormatting.BOLD.toString()+"LEGENDARY", + // EnumChatFormatting.LIGHT_PURPLE+EnumChatFormatting.BOLD.toString()+"MYTHIC", + // EnumChatFormatting.RED+EnumChatFormatting.BOLD.toString()+"SPECIAL", + // EnumChatFormatting.RED+EnumChatFormatting.BOLD.toString()+"VERY SPECIAL", + // EnumChatFormatting.DARK_RED+EnumChatFormatting.BOLD.toString()+"SUPREME", + // }; + public static int checkItemType(ItemStack stack, boolean contains, String... typeMatches) { NBTTagCompound tag = stack.getTagCompound(); if (tag != null) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java index 2ed1e2fb..8fe54911 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java @@ -43,7 +43,6 @@ import java.util.regex.Pattern; import static io.github.moulberry.notenoughupdates.util.GuiTextures.help; public class CalendarOverlay { - private static final ResourceLocation BACKGROUND = new ResourceLocation("notenoughupdates:calendar/background.png"); private static final ResourceLocation DISPLAYBAR = new ResourceLocation("notenoughupdates:calendar/displaybar.png"); private static final ResourceLocation TOAST = new ResourceLocation("notenoughupdates:calendar/toast.png"); @@ -1390,5 +1389,4 @@ public class CalendarOverlay { projMatrix.m23 = -1.0001999F; return projMatrix; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java index 4510c675..adadc60c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java @@ -44,7 +44,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class GuiCustomEnchant extends Gui { - private static final GuiCustomEnchant INSTANCE = new GuiCustomEnchant(); private static final ResourceLocation TEXTURE = new ResourceLocation("notenoughupdates:custom_enchant_gui.png"); private static final ResourceLocation ENCHANTMENT_TABLE_BOOK_TEXTURE = new ResourceLocation("textures/entity/enchanting_table_book.png"); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java index e1280bb9..60cdf1c8 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java @@ -37,7 +37,6 @@ import java.util.regex.Pattern; import static io.github.moulberry.notenoughupdates.util.GuiTextures.help; public class GuiEnchantColour extends GuiScreen { - public static final ResourceLocation custom_ench_colour = new ResourceLocation("notenoughupdates:custom_ench_colour.png"); private static final String sharePrefix = "NEUEC/"; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiInvButtonEditor.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiInvButtonEditor.java index 07f514cc..074af960 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiInvButtonEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiInvButtonEditor.java @@ -38,7 +38,6 @@ import java.util.concurrent.atomic.AtomicInteger; import static io.github.moulberry.notenoughupdates.miscgui.GuiEnchantColour.custom_ench_colour; public class GuiInvButtonEditor extends GuiScreen { - private static final ResourceLocation INVENTORY = new ResourceLocation("minecraft:textures/gui/container/inventory.png"); private static final ResourceLocation EDITOR = new ResourceLocation("notenoughupdates:invbuttons/editor.png"); private static final ResourceLocation EXTRA_ICONS_JSON = new ResourceLocation("notenoughupdates:invbuttons/extraicons.json"); @@ -64,58 +63,54 @@ public class GuiInvButtonEditor extends GuiScreen { private final GuiElementTextField commandTextField = new GuiElementTextField("", editorXSize - 14, 16, GuiElementTextField.SCALE_TEXT); private final GuiElementTextField iconTextField = new GuiElementTextField("", editorXSize - 14, 16, GuiElementTextField.SCALE_TEXT); - private static final HashSet<String> prioritisedIcons = new HashSet<>(); - - static { - prioritisedIcons.add("WORKBENCH"); - prioritisedIcons.add("LEATHER_CHESTPLATE"); - prioritisedIcons.add("CHEST"); - prioritisedIcons.add("BONE"); - prioritisedIcons.add("ENDER_CHEST"); - prioritisedIcons.add("GOLD_BARDING"); - prioritisedIcons.add("COMPASS"); - prioritisedIcons.add("GOLD_BLOCK"); - prioritisedIcons.add("EMPTY_MAP"); - prioritisedIcons.add("RAW_FISH"); - prioritisedIcons.add("FISHING_ROD"); - prioritisedIcons.add("EMERALD"); - prioritisedIcons.add("IRON_SWORD"); - prioritisedIcons.add("POTION"); - prioritisedIcons.add("NETHER_STAR"); - prioritisedIcons.add("PAINTING"); - prioritisedIcons.add("COMMAND"); - prioritisedIcons.add("BOOK"); - } + private static final HashSet<String> prioritisedIcons = new HashSet<String>() {{ + add("WORKBENCH"); + add("LEATHER_CHESTPLATE"); + add("CHEST"); + add("BONE"); + add("ENDER_CHEST"); + add("GOLD_BARDING"); + add("COMPASS"); + add("GOLD_BLOCK"); + add("EMPTY_MAP"); + add("RAW_FISH"); + add("FISHING_ROD"); + add("EMERALD"); + add("IRON_SWORD"); + add("POTION"); + add("NETHER_STAR"); + add("PAINTING"); + add("COMMAND"); + add("BOOK"); + }}; private static HashMap<String, String> extraIcons = null; - private static final HashMap<String, String> skullIcons = new HashMap<>(); - - static { - skullIcons.put("personal bank", "skull:e36e94f6c34a35465fce4a90f2e25976389eb9709a12273574ff70fd4daa6852"); - skullIcons.put("skyblock hub", "skull:d7cc6687423d0570d556ac53e0676cb563bbdd9717cd8269bdebed6f6d4e7bf8"); - skullIcons.put("private island", "skull:c9c8881e42915a9d29bb61a16fb26d059913204d265df5b439b3d792acd56"); - skullIcons.put("castle", "skull:f4559d75464b2e40a518e4de8e6cf3085f0a3ca0b1b7012614c4cd96fed60378"); - skullIcons.put("sirius shack", "skull:7ab83858ebc8ee85c3e54ab13aabfcc1ef2ad446d6a900e471c3f33b78906a5b"); - skullIcons.put("crypts", "skull:25d2f31ba162fe6272e831aed17f53213db6fa1c4cbe4fc827f3963cc98b9"); - skullIcons.put("spiders den", "skull:c754318a3376f470e481dfcd6c83a59aa690ad4b4dd7577fdad1c2ef08d8aee6"); - skullIcons.put("top of the nest", "skull:9d7e3b19ac4f3dee9c5677c135333b9d35a7f568b63d1ef4ada4b068b5a25"); - skullIcons.put("blazing fortress", "skull:c3687e25c632bce8aa61e0d64c24e694c3eea629ea944f4cf30dcfb4fbce071"); - skullIcons.put("blazing fortress magma boss", "skull:38957d5023c937c4c41aa2412d43410bda23cf79a9f6ab36b76fef2d7c429"); - skullIcons.put("the end", "skull:7840b87d52271d2a755dedc82877e0ed3df67dcc42ea479ec146176b02779a5"); - skullIcons.put("the end dragons nest", "skull:a1cd6d2d03f135e7c6b5d6cdae1b3a68743db4eb749faf7341e9fb347aa283b"); - skullIcons.put("the park", "skull:a221f813dacee0fef8c59f76894dbb26415478d9ddfc44c2e708a6d3b7549b"); - skullIcons.put("the park jungle", "skull:79ca3540621c1c79c32bf42438708ff1f5f7d0af9b14a074731107edfeb691c"); - skullIcons.put("the park howling cave", "skull:1832d53997b451635c9cf9004b0f22bb3d99ab5a093942b5b5f6bb4e4de47065"); - skullIcons.put("gold mines", "skull:73bc965d579c3c6039f0a17eb7c2e6faf538c7a5de8e60ec7a719360d0a857a9"); - skullIcons.put("deep caverns", "skull:569a1f114151b4521373f34bc14c2963a5011cdc25a6554c48c708cd96ebfc"); - skullIcons.put("the barn", "skull:4d3a6bd98ac1833c664c4909ff8d2dc62ce887bdcf3cc5b3848651ae5af6b"); - skullIcons.put("mushroom desert", "skull:2116b9d8df346a25edd05f842e7a9345beaf16dca4118abf5a68c75bcaae10"); - skullIcons.put("dungeon hub", "skull:9b56895b9659896ad647f58599238af532d46db9c1b0389b8bbeb70999dab33d"); - skullIcons.put("dwarven mines", "skull:569a1f114151b4521373f34bc14c2963a5011cdc25a6554c48c708cd96ebfc"); - skullIcons.put("hotm heart of the mountain", "skull:86f06eaa3004aeed09b3d5b45d976de584e691c0e9cade133635de93d23b9edb"); - skullIcons.put("bazaar dude", "skull:c232e3820897429157619b0ee099fec0628f602fff12b695de54aef11d923ad7"); - } + private static final HashMap<String, String> skullIcons = new HashMap<String, String>() {{ + put("personal bank", "skull:e36e94f6c34a35465fce4a90f2e25976389eb9709a12273574ff70fd4daa6852"); + put("skyblock hub", "skull:d7cc6687423d0570d556ac53e0676cb563bbdd9717cd8269bdebed6f6d4e7bf8"); + put("private island", "skull:c9c8881e42915a9d29bb61a16fb26d059913204d265df5b439b3d792acd56"); + put("castle", "skull:f4559d75464b2e40a518e4de8e6cf3085f0a3ca0b1b7012614c4cd96fed60378"); + put("sirius shack", "skull:7ab83858ebc8ee85c3e54ab13aabfcc1ef2ad446d6a900e471c3f33b78906a5b"); + put("crypts", "skull:25d2f31ba162fe6272e831aed17f53213db6fa1c4cbe4fc827f3963cc98b9"); + put("spiders den", "skull:c754318a3376f470e481dfcd6c83a59aa690ad4b4dd7577fdad1c2ef08d8aee6"); + put("top of the nest", "skull:9d7e3b19ac4f3dee9c5677c135333b9d35a7f568b63d1ef4ada4b068b5a25"); + put("blazing fortress", "skull:c3687e25c632bce8aa61e0d64c24e694c3eea629ea944f4cf30dcfb4fbce071"); + put("blazing fortress magma boss", "skull:38957d5023c937c4c41aa2412d43410bda23cf79a9f6ab36b76fef2d7c429"); + put("the end", "skull:7840b87d52271d2a755dedc82877e0ed3df67dcc42ea479ec146176b02779a5"); + put("the end dragons nest", "skull:a1cd6d2d03f135e7c6b5d6cdae1b3a68743db4eb749faf7341e9fb347aa283b"); + put("the park", "skull:a221f813dacee0fef8c59f76894dbb26415478d9ddfc44c2e708a6d3b7549b"); + put("the park jungle", "skull:79ca3540621c1c79c32bf42438708ff1f5f7d0af9b14a074731107edfeb691c"); + put("the park howling cave", "skull:1832d53997b451635c9cf9004b0f22bb3d99ab5a093942b5b5f6bb4e4de47065"); + put("gold mines", "skull:73bc965d579c3c6039f0a17eb7c2e6faf538c7a5de8e60ec7a719360d0a857a9"); + put("deep caverns", "skull:569a1f114151b4521373f34bc14c2963a5011cdc25a6554c48c708cd96ebfc"); + put("the barn", "skull:4d3a6bd98ac1833c664c4909ff8d2dc62ce887bdcf3cc5b3848651ae5af6b"); + put("mushroom desert", "skull:2116b9d8df346a25edd05f842e7a9345beaf16dca4118abf5a68c75bcaae10"); + put("dungeon hub", "skull:9b56895b9659896ad647f58599238af532d46db9c1b0389b8bbeb70999dab33d"); + put("dwarven mines", "skull:569a1f114151b4521373f34bc14c2963a5011cdc25a6554c48c708cd96ebfc"); + put("hotm heart of the mountain", "skull:86f06eaa3004aeed09b3d5b45d976de584e691c0e9cade133635de93d23b9edb"); + put("bazaar dude", "skull:c232e3820897429157619b0ee099fec0628f602fff12b695de54aef11d923ad7"); + }}; private static LinkedHashMap<String, List<NEUConfig.InventoryButton>> presets = null; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java index 5678a832..e6fba274 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java @@ -26,7 +26,6 @@ import java.io.IOException; import java.util.List; public class GuiItemCustomize extends GuiScreen { - private static final ResourceLocation RESET = new ResourceLocation("notenoughupdates:itemcustomize/reset.png"); private final ItemStack stack; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java index a6928102..210e1da7 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.util.List; public class GuiItemRecipe extends GuiScreen { - private static final ResourceLocation resourcePacksTexture = new ResourceLocation("textures/gui/resource_packs.png"); private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation("textures/gui/container/crafting_table.png"); @@ -233,5 +232,4 @@ public class GuiItemRecipe extends GuiScreen { } } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/InventoryStorageSelector.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/InventoryStorageSelector.java index 434d70c3..2a013306 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/InventoryStorageSelector.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/InventoryStorageSelector.java @@ -22,7 +22,6 @@ import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; public class InventoryStorageSelector { - private static final InventoryStorageSelector INSTANCE = new InventoryStorageSelector(); private static final ResourceLocation ICONS = new ResourceLocation("notenoughupdates:storage_gui/hotbar_icons.png"); @@ -155,8 +154,7 @@ public class InventoryStorageSelector { } KeyBinding.setKeyBindState(attack.getKeyCode(), false); - while (attack.isPressed()) { - } + while (attack.isPressed()) {} } if (use.isPressed() || use.isKeyDown()) { @@ -165,8 +163,7 @@ public class InventoryStorageSelector { } KeyBinding.setKeyBindState(use.getKeyCode(), false); - while (use.isPressed()) { - } + while (use.isPressed()) {} } } } @@ -455,5 +452,4 @@ public class InventoryStorageSelector { GlStateManager.enableBlend(); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/NEUOverlayPlacements.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/NEUOverlayPlacements.java index 83e0a4b0..17e51dd2 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/NEUOverlayPlacements.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/NEUOverlayPlacements.java @@ -18,7 +18,6 @@ import java.awt.*; import java.io.IOException; public class NEUOverlayPlacements extends GuiScreen { - private int clickedX; private int clickedY; private int clickedAnchorX; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java index da8ac561..286ccfa4 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java @@ -42,7 +42,6 @@ import java.util.List; import java.util.*; public class StorageOverlay extends GuiElement { - private static final int CHEST_TOP_OFFSET = 17; private static final int CHEST_SLOT_SIZE = 18; private static final int CHEST_BOTTOM_OFFSET = 215; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java index d1df10c8..fda6dd03 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java @@ -32,7 +32,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class TradeWindow { - private static final ResourceLocation location = new ResourceLocation("notenoughupdates", "custom_trade.png"); private static final int xSize = 176; @@ -870,19 +869,22 @@ public class TradeWindow { if (mouseX >= guiLeft + xSize + 3 && mouseX <= guiLeft + xSize + 3 + 17) { if (mouseY >= guiTop + ySize - 19 && mouseY <= guiTop + ySize - 19 + 17) { - tooltipToDisplay = new ArrayList<>(); - tooltipToDisplay.add(EnumChatFormatting.GOLD + "Enable Custom Trade Menu"); - tooltipToDisplay.add(EnumChatFormatting.GRAY + "Use this menu instead of the default trade window"); + tooltipToDisplay = new ArrayList<String>() {{ + add(EnumChatFormatting.GOLD + "Enable Custom Trade Menu"); + add(EnumChatFormatting.GRAY + "Use this menu instead of the default trade window"); + }}; tooltipLen = 200; } else if (mouseY >= guiTop + ySize - 38 && mouseY <= guiTop + ySize - 38 + 17) { - tooltipToDisplay = new ArrayList<>(); - tooltipToDisplay.add(EnumChatFormatting.GOLD + "Price Information"); - tooltipToDisplay.add(EnumChatFormatting.GRAY + "Show the price of items on both sides"); + tooltipToDisplay = new ArrayList<String>() {{ + add(EnumChatFormatting.GOLD + "Price Information"); + add(EnumChatFormatting.GRAY + "Show the price of items on both sides"); + }}; tooltipLen = 200; } else if (mouseY >= guiTop + ySize - 57 && mouseY <= guiTop + ySize - 57 + 17) { - tooltipToDisplay = new ArrayList<>(); - tooltipToDisplay.add(EnumChatFormatting.GOLD + "Trade Prices Style"); - tooltipToDisplay.add(EnumChatFormatting.GRAY + "Changes the style of the top item prices"); + tooltipToDisplay = new ArrayList<String>() {{ + add(EnumChatFormatting.GOLD + "Trade Prices Style"); + add(EnumChatFormatting.GRAY + "Changes the style of the top item prices"); + }}; tooltipLen = 200; } } @@ -1039,5 +1041,4 @@ public class TradeWindow { return Keyboard.getEventKey() != Keyboard.KEY_ESCAPE; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuConfigTutorial.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuConfigTutorial.java index c4d0115f..1cb9443f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuConfigTutorial.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuConfigTutorial.java @@ -1,9 +1,7 @@ package io.github.moulberry.notenoughupdates.miscgui.tutorials; public class NeuConfigTutorial extends TutorialBase { - static { title = "NEU Config Tutorial"; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuTutorial.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuTutorial.java index f4d09b54..204bd5e9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuTutorial.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuTutorial.java @@ -4,7 +4,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.util.ResourceLocation; public class NeuTutorial extends TutorialBase { - static { title = "NEU Tutorial"; } @@ -18,104 +17,104 @@ public class NeuTutorial extends TutorialBase { } } -// static { -// -// texts[0].put(new Vector2f(0.73f, 0.60f), Utils.createList( -// EnumChatFormatting.GOLD + "Itemlist", -// EnumChatFormatting.GRAY + "Here you will find a list of (most) skyblock items", -// EnumChatFormatting.GRAY + "The itemlist can be accessed by opening your inventory or most menus while on skyblock")); -// texts[1].put(new Vector2f(0.73f, 0.16f), Utils.createList( -// EnumChatFormatting.GOLD + "Itemlist", -// EnumChatFormatting.GRAY + "These are the page controls for the itemlist", -// EnumChatFormatting.GRAY + "Clicking these controls will bring you to other pages of the itemlist")); -// texts[2].put(new Vector2f(0.73f, 1.05f), Utils.createList( -// EnumChatFormatting.GOLD + "Itemlist", -// EnumChatFormatting.GRAY + "These are the sorting controls for the itemlist", -// EnumChatFormatting.GRAY + "The buttons on the left control the ordering of the items", -// EnumChatFormatting.GRAY + "The buttons on the right can be used to filter a certain type of item")); -// texts[3].put(new Vector2f(0.39f, 1.04f), Utils.createList( -// EnumChatFormatting.GOLD + "Itemlist", -// EnumChatFormatting.GRAY + "This is the search bar for the itemlist", -// EnumChatFormatting.GRAY + "Double-click the bar to enable inventory search mode", -// EnumChatFormatting.GRAY + "The button on the left opens up the mod settings", -// EnumChatFormatting.GRAY + "The button on the right displays this tutorial")); -// texts[4].put(new Vector2f(0.39f, 0.99f), Utils.createList( -// EnumChatFormatting.GOLD + "QuickCommands", -// EnumChatFormatting.GRAY + "These are the QuickCommands", -// EnumChatFormatting.GRAY + "They let you warp around or access certain menus more easily")); -// texts[5].put(new Vector2f(0.7f, 0.71f), Utils.createList( -// EnumChatFormatting.GOLD + "Itemlist", -// EnumChatFormatting.GRAY + "Hover over an item in the list to display it's lore", -// EnumChatFormatting.GRAY + "Left clicking some items will display the recipe for that item", -// EnumChatFormatting.GRAY + "Right clicking some items will display a wiki page for that item", -// EnumChatFormatting.GRAY + "'F' will favourite an item, putting it to the top of the itemlist")); -// texts[6].put(new Vector2f(0.17f, 0.21f), Utils.createList( -// EnumChatFormatting.GOLD + "Collection Log", -// EnumChatFormatting.GRAY + "This is the collection log. It can be accessed using the /neucl command, or via the QuickCommand", -// EnumChatFormatting.GRAY + "The collection log keeps track of all items that enter your inventory while you are playing skyblock", -// EnumChatFormatting.GRAY + "If you are a completionist, this feature is for you")); -// texts[7].put(new Vector2f(0.05f, 0.13f), Utils.createList( -// EnumChatFormatting.GOLD + "Collection Log", -// EnumChatFormatting.GRAY + "Clicking on 'Filter' will change the items that", -// EnumChatFormatting.GRAY + "appear in the list")); -// texts[8].put(new Vector2f(0.35f, 0.74f), Utils.createList( -// EnumChatFormatting.GOLD + "NeuAH", -// EnumChatFormatting.GRAY + "This is the NEU Auction House (NeuAH)", -// EnumChatFormatting.GRAY + "This AH can be accessed from anywhere using the /neuah command, or via the QuickCommand", -// EnumChatFormatting.GRAY + "The items here refresh automatically, so there is no need to close the GUI to see the latest auctions", -// EnumChatFormatting.GRAY + "Sometimes, you might have to wait until the list is populated with items from the API")); -// texts[9].put(new Vector2f(0.41f, 0.40f), Utils.createList( -// EnumChatFormatting.GOLD + "NeuAH", -// EnumChatFormatting.GRAY + "These tabs control the items that appear in NeuAH", -// EnumChatFormatting.GRAY + "You can find the main categories on the top of the GUI and subcategories appear on the side of the GUI once a main category is selected")); -// texts[10].put(new Vector2f(0.57f, 0.38f), Utils.createList( -// EnumChatFormatting.GOLD + "NeuAH", -// EnumChatFormatting.GRAY + "Search for items using the search bar at the top", -// EnumChatFormatting.GRAY + "Boolean operators such as &, | or ! work here.")); -// texts[10].put(new Vector2f(0.40f, 0.72f), Utils.createList( -// EnumChatFormatting.GOLD + "NeuAH", -// EnumChatFormatting.GRAY + "This toolbar contains many useful features", -// EnumChatFormatting.GRAY + "which control the sorting and ordering of", -// EnumChatFormatting.GRAY + "the auction house, similar to the normal AH")); -// texts[11].put(new Vector2f(0.55f, 0.72f), Utils.createList( -// EnumChatFormatting.GOLD + "NeuAH", -// EnumChatFormatting.GRAY + "Clicking on an item will bring up the auction view", -// EnumChatFormatting.GRAY + "Here you can viewer the buyer/seller and place bids or make purchases", -// EnumChatFormatting.GRAY + "Trying to purchase an item will result in a confirmation GUI similar to the normal AH")); -// texts[12].put(new Vector2f(0.28f, 0.82f), Utils.createList( -// EnumChatFormatting.GOLD + "Profile Viewer", -// EnumChatFormatting.GRAY + "Access the profile viewer using /neuprofile (ign) or /pv (ign)", -// EnumChatFormatting.GRAY + "This is the main page of the profile viewer", -// EnumChatFormatting.GRAY + "This page contains basic information like stats and skill levels")); -// texts[12].put(new Vector2f(0.72f, 0.55f), Utils.createList( -// EnumChatFormatting.GOLD + "Profile Viewer", -// EnumChatFormatting.GRAY + "Click the button on the left to switch profiles and use the bar on the right to switch players")); -// texts[13].put(new Vector2f(0.28f, 0.82f), Utils.createList( -// EnumChatFormatting.GOLD + "Profile Viewer", -// EnumChatFormatting.GRAY + "This is the extra info page of the profile viewer", -// EnumChatFormatting.GRAY + "This page contains all the small bits of information about a player that don't fit anywhere else")); -// texts[14].put(new Vector2f(0.28f, 0.82f), Utils.createList( -// EnumChatFormatting.GOLD + "Profile Viewer", -// EnumChatFormatting.GRAY + "This is the inventories page of the profile viewer", -// EnumChatFormatting.GRAY + "Click on the inventory icons in the top-left or use your keyboard to switch the inventory type", -// EnumChatFormatting.GRAY + "The bar on the bottom-left searches the current inventory for matching items")); -// texts[15].put(new Vector2f(0.28f, 0.82f), Utils.createList( -// EnumChatFormatting.GOLD + "Profile Viewer", -// EnumChatFormatting.GRAY + "This is the collections page of the profile viewer", -// EnumChatFormatting.GRAY + "Click on the icons on the left or use the keyboard shortcut to switch collection type")); -// texts[16].put(new Vector2f(0.28f, 0.82f), Utils.createList( -// EnumChatFormatting.GOLD + "Profile Viewer", -// EnumChatFormatting.GRAY + "This is the pets page of the profile viewer", -// EnumChatFormatting.GRAY + "Click to select the pet on the left", -// EnumChatFormatting.GRAY + "The selected pet's stats will display on the right")); -// texts[17].put(new Vector2f(0.27f, 0.40f), Utils.createList( -// EnumChatFormatting.GOLD + "Overlay", -// EnumChatFormatting.GRAY + "Rearrange certain GUI elements of the main overlay using /neuoverlay", -// EnumChatFormatting.GRAY + "If you accidentally move them off screen, use the button in the top left to reset the GUI")); -// } -// -// static { -// buttons = new ArrayList<>(); -// buttons.add(createNewButton(0.27f, 0.40f, new int[]{1, 2}, "TESTSHIT", "neu")); -// } + // static { + // texts[0].put(new Vector2f(0.73f, 0.60f), Utils.createList( + // EnumChatFormatting.GOLD + "Itemlist", + // EnumChatFormatting.GRAY + "Here you will find a list of (most) skyblock items", + // EnumChatFormatting.GRAY + "The itemlist can be accessed by opening your inventory or most menus while on skyblock")); + // texts[1].put(new Vector2f(0.73f, 0.16f), Utils.createList( + // EnumChatFormatting.GOLD + "Itemlist", + // EnumChatFormatting.GRAY + "These are the page controls for the itemlist", + // EnumChatFormatting.GRAY + "Clicking these controls will bring you to other pages of the itemlist")); + // texts[2].put(new Vector2f(0.73f, 1.05f), Utils.createList( + // EnumChatFormatting.GOLD + "Itemlist", + // EnumChatFormatting.GRAY + "These are the sorting controls for the itemlist", + // EnumChatFormatting.GRAY + "The buttons on the left control the ordering of the items", + // EnumChatFormatting.GRAY + "The buttons on the right can be used to filter a certain type of item")); + // texts[3].put(new Vector2f(0.39f, 1.04f), Utils.createList( + // EnumChatFormatting.GOLD + "Itemlist", + // EnumChatFormatting.GRAY + "This is the search bar for the itemlist", + // EnumChatFormatting.GRAY + "Double-click the bar to enable inventory search mode", + // EnumChatFormatting.GRAY + "The button on the left opens up the mod settings", + // EnumChatFormatting.GRAY + "The button on the right displays this tutorial")); + // texts[4].put(new Vector2f(0.39f, 0.99f), Utils.createList( + // EnumChatFormatting.GOLD + "QuickCommands", + // EnumChatFormatting.GRAY + "These are the QuickCommands", + // EnumChatFormatting.GRAY + "They let you warp around or access certain menus more easily")); + // texts[5].put(new Vector2f(0.7f, 0.71f), Utils.createList( + // EnumChatFormatting.GOLD + "Itemlist", + // EnumChatFormatting.GRAY + "Hover over an item in the list to display it's lore", + // EnumChatFormatting.GRAY + "Left clicking some items will display the recipe for that item", + // EnumChatFormatting.GRAY + "Right clicking some items will display a wiki page for that item", + // EnumChatFormatting.GRAY + "'F' will favourite an item, putting it to the top of the itemlist")); + // texts[6].put(new Vector2f(0.17f, 0.21f), Utils.createList( + // EnumChatFormatting.GOLD + "Collection Log", + // EnumChatFormatting.GRAY + "This is the collection log. It can be accessed using the /neucl command, or via the QuickCommand", + // EnumChatFormatting.GRAY + "The collection log keeps track of all items that enter your inventory while you are playing skyblock", + // EnumChatFormatting.GRAY + "If you are a completionist, this feature is for you")); + // texts[7].put(new Vector2f(0.05f, 0.13f), Utils.createList( + // EnumChatFormatting.GOLD + "Collection Log", + // EnumChatFormatting.GRAY + "Clicking on 'Filter' will change the items that", + // EnumChatFormatting.GRAY + "appear in the list")); + // texts[8].put(new Vector2f(0.35f, 0.74f), Utils.createList( + // EnumChatFormatting.GOLD + "NeuAH", + // EnumChatFormatting.GRAY + "This is the NEU Auction House (NeuAH)", + // EnumChatFormatting.GRAY + "This AH can be accessed from anywhere using the /neuah command, or via the QuickCommand", + // EnumChatFormatting.GRAY + "The items here refresh automatically, so there is no need to close the GUI to see the latest auctions", + // EnumChatFormatting.GRAY + "Sometimes, you might have to wait until the list is populated with items from the API")); + // texts[9].put(new Vector2f(0.41f, 0.40f), Utils.createList( + // EnumChatFormatting.GOLD + "NeuAH", + // EnumChatFormatting.GRAY + "These tabs control the items that appear in NeuAH", + // EnumChatFormatting.GRAY + "You can find the main categories on the top of the GUI and subcategories appear on the side of the GUI once a main category is selected")); + // texts[10].put(new Vector2f(0.57f, 0.38f), Utils.createList( + // EnumChatFormatting.GOLD + "NeuAH", + // EnumChatFormatting.GRAY + "Search for items using the search bar at the top", + // EnumChatFormatting.GRAY + "Boolean operators such as &, | or ! work here.")); + // texts[10].put(new Vector2f(0.40f, 0.72f), Utils.createList( + // EnumChatFormatting.GOLD + "NeuAH", + // EnumChatFormatting.GRAY + "This toolbar contains many useful features", + // EnumChatFormatting.GRAY + "which control the sorting and ordering of", + // EnumChatFormatting.GRAY + "the auction house, similar to the normal AH")); + // texts[11].put(new Vector2f(0.55f, 0.72f), Utils.createList( + // EnumChatFormatting.GOLD + "NeuAH", + // EnumChatFormatting.GRAY + "Clicking on an item will bring up the auction view", + // EnumChatFormatting.GRAY + "Here you can viewer the buyer/seller and place bids or make purchases", + // EnumChatFormatting.GRAY + "Trying to purchase an item will result in a confirmation GUI similar to the normal AH")); + // texts[12].put(new Vector2f(0.28f, 0.82f), Utils.createList( + // EnumChatFormatting.GOLD + "Profile Viewer", + // EnumChatFormatting.GRAY + "Access the profile viewer using /neuprofile (ign) or /pv (ign)", + // EnumChatFormatting.GRAY + "This is the main page of the profile viewer", + // EnumChatFormatting.GRAY + "This page contains basic information like stats and skill levels")); + // texts[12].put(new Vector2f(0.72f, 0.55f), Utils.createList( + // EnumChatFormatting.GOLD + "Profile Viewer", + // EnumChatFormatting.GRAY + "Click the button on the left to switch profiles and use the bar on the right to switch players")); + // texts[13].put(new Vector2f(0.28f, 0.82f), Utils.createList( + // EnumChatFormatting.GOLD + "Profile Viewer", + // EnumChatFormatting.GRAY + "This is the extra info page of the profile viewer", + // EnumChatFormatting.GRAY + "This page contains all the small bits of information about a player that don't fit anywhere else")); + // texts[14].put(new Vector2f(0.28f, 0.82f), Utils.createList( + // EnumChatFormatting.GOLD + "Profile Viewer", + // EnumChatFormatting.GRAY + "This is the inventories page of the profile viewer", + // EnumChatFormatting.GRAY + "Click on the inventory icons in the top-left or use your keyboard to switch the inventory type", + // EnumChatFormatting.GRAY + "The bar on the bottom-left searches the current inventory for matching items")); + // texts[15].put(new Vector2f(0.28f, 0.82f), Utils.createList( + // EnumChatFormatting.GOLD + "Profile Viewer", + // EnumChatFormatting.GRAY + "This is the collections page of the profile viewer", + // EnumChatFormatting.GRAY + "Click on the icons on the left or use the keyboard shortcut to switch collection type")); + // texts[16].put(new Vector2f(0.28f, 0.82f), Utils.createList( + // EnumChatFormatting.GOLD + "Profile Viewer", + // EnumChatFormatting.GRAY + "This is the pets page of the profile viewer", + // EnumChatFormatting.GRAY + "Click to select the pet on the left", + // EnumChatFormatting.GRAY + "The selected pet's stats will display on the right")); + // texts[17].put(new Vector2f(0.27f, 0.40f), Utils.createList( + // EnumChatFormatting.GOLD + "Overlay", + // EnumChatFormatting.GRAY + "Rearrange certain GUI elements of the main overlay using /neuoverlay", + // EnumChatFormatting.GRAY + "If you accidentally move them off screen, use the button in the top left to reset the GUI")); + // } + // + // static { + // buttons = new ArrayList<JsonObject>() {{ + // add(createNewButton(0.27f, 0.40f, new int[]{1, 2}, "TESTSHIT", "neu")); + // }}; + // } } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/TutorialBase.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/TutorialBase.java index 48ee3bc7..05b304a6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/TutorialBase.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/TutorialBase.java @@ -22,7 +22,6 @@ import java.util.List; import static io.github.moulberry.notenoughupdates.miscgui.GuiEnchantColour.custom_ench_colour; public class TutorialBase extends GuiScreen { - private int guiLeft = 0; private int guiTop = 0; private int sizeX = 0; @@ -86,7 +85,7 @@ public class TutorialBase extends GuiScreen { float oldX = textElement.get("x").getAsFloat(); float oldY = textElement.get("y").getAsFloat(); -// List<String> text = entry.getValue(); + // List<String> text = entry.getValue(); JsonArray textArray = textElement.getAsJsonArray("lines"); List<String> text = new ArrayList<>(); for (int j = 0; j < textArray.size(); j++) { @@ -119,7 +118,7 @@ public class TutorialBase extends GuiScreen { float x = button.get("x").getAsFloat(); float y = button.get("y").getAsFloat(); String text = button.get("text").getAsString(); -// String command = button.get("command").getAsString(); + // String command = button.get("command").getAsString(); Minecraft.getMinecraft().getTextureManager().bindTexture(custom_ench_colour); GlStateManager.color(1, 1, 1, 1); Utils.drawTexturedRect(guiLeft + 20f / scaleFactor + (sizeX - 40f / scaleFactor) * x, guiTop + 20f / scaleFactor + (sizeY - 40f / scaleFactor) * y, 88, 20, 64 / 217f, 152 / 217f, 48 / 78f, 68 / 78f, GL11.GL_NEAREST); @@ -148,7 +147,7 @@ public class TutorialBase extends GuiScreen { } float x = button.get("x").getAsFloat(); float y = button.get("y").getAsFloat(); - //String text = button.get("text").getAsString(); + // String text = button.get("text").getAsString(); float realX = guiLeft + 20f / scaleFactor + (sizeX - 40f / scaleFactor) * x; float realY = guiTop + 20f / scaleFactor + (sizeY - 40f / scaleFactor) * y; if (mouseX > realX && mouseX < realX + width && mouseY > realY && mouseY < realY + height) { @@ -210,101 +209,101 @@ public class TutorialBase extends GuiScreen { return tooltip; } -// static { -// for(int i=0; i<18; i++) { -// texts[i] = new HashMap<>(); -// } -// texts[0].put(new Vector2f(0.73f, 0.60f), Utils.createList( -// EnumChatFormatting.GOLD+"Itemlist", -// EnumChatFormatting.GRAY+"Here you will find a list of (most) skyblock items", -// EnumChatFormatting.GRAY+"The itemlist can be accessed by opening your inventory or most menus while on skyblock")); -// texts[1].put(new Vector2f(0.73f, 0.16f), Utils.createList( -// EnumChatFormatting.GOLD+"Itemlist", -// EnumChatFormatting.GRAY+"These are the page controls for the itemlist", -// EnumChatFormatting.GRAY+"Clicking these controls will bring you to other pages of the itemlist")); -// texts[2].put(new Vector2f(0.73f, 1.05f), Utils.createList( -// EnumChatFormatting.GOLD+"Itemlist", -// EnumChatFormatting.GRAY+"These are the sorting controls for the itemlist", -// EnumChatFormatting.GRAY+"The buttons on the left control the ordering of the items", -// EnumChatFormatting.GRAY+"The buttons on the right can be used to filter a certain type of item")); -// texts[3].put(new Vector2f(0.39f, 1.04f), Utils.createList( -// EnumChatFormatting.GOLD+"Itemlist", -// EnumChatFormatting.GRAY+"This is the search bar for the itemlist", -// EnumChatFormatting.GRAY+"Double-click the bar to enable inventory search mode", -// EnumChatFormatting.GRAY+"The button on the left opens up the mod settings", -// EnumChatFormatting.GRAY+"The button on the right displays this tutorial")); -// texts[4].put(new Vector2f(0.39f, 0.99f), Utils.createList( -// EnumChatFormatting.GOLD+"QuickCommands", -// EnumChatFormatting.GRAY+"These are the QuickCommands", -// EnumChatFormatting.GRAY+"They let you warp around or access certain menus more easily")); -// texts[5].put(new Vector2f(0.7f, 0.71f), Utils.createList( -// EnumChatFormatting.GOLD+"Itemlist", -// EnumChatFormatting.GRAY+"Hover over an item in the list to display it's lore", -// EnumChatFormatting.GRAY+"Left clicking some items will display the recipe for that item", -// EnumChatFormatting.GRAY+"Right clicking some items will display a wiki page for that item", -// EnumChatFormatting.GRAY+"'F' will favourite an item, putting it to the top of the itemlist")); -// texts[6].put(new Vector2f(0.17f, 0.21f), Utils.createList( -// EnumChatFormatting.GOLD+"Collection Log", -// EnumChatFormatting.GRAY+"This is the collection log. It can be accessed using the /neucl command, or via the QuickCommand", -// EnumChatFormatting.GRAY+"The collection log keeps track of all items that enter your inventory while you are playing skyblock", -// EnumChatFormatting.GRAY+"If you are a completionist, this feature is for you")); -// texts[7].put(new Vector2f(0.05f, 0.13f), Utils.createList( -// EnumChatFormatting.GOLD+"Collection Log", -// EnumChatFormatting.GRAY+"Clicking on 'Filter' will change the items that", -// EnumChatFormatting.GRAY+"appear in the list")); -// texts[8].put(new Vector2f(0.35f, 0.74f), Utils.createList( -// EnumChatFormatting.GOLD+"NeuAH", -// EnumChatFormatting.GRAY+"This is the NEU Auction House (NeuAH)", -// EnumChatFormatting.GRAY+"This AH can be accessed from anywhere using the /neuah command, or via the QuickCommand", -// EnumChatFormatting.GRAY+"The items here refresh automatically, so there is no need to close the GUI to see the latest auctions", -// EnumChatFormatting.GRAY+"Sometimes, you might have to wait until the list is populated with items from the API")); -// texts[9].put(new Vector2f(0.41f, 0.40f), Utils.createList( -// EnumChatFormatting.GOLD+"NeuAH", -// EnumChatFormatting.GRAY+"These tabs control the items that appear in NeuAH", -// EnumChatFormatting.GRAY+"You can find the main categories on the top of the GUI and subcategories appear on the side of the GUI once a main category is selected")); -// texts[10].put(new Vector2f(0.57f, 0.38f), Utils.createList( -// EnumChatFormatting.GOLD+"NeuAH", -// EnumChatFormatting.GRAY+"Search for items using the search bar at the top", -// EnumChatFormatting.GRAY+"Boolean operators such as &, | or ! work here.")); -// texts[10].put(new Vector2f(0.40f, 0.72f), Utils.createList( -// EnumChatFormatting.GOLD+"NeuAH", -// EnumChatFormatting.GRAY+"This toolbar contains many useful features", -// EnumChatFormatting.GRAY+"which control the sorting and ordering of", -// EnumChatFormatting.GRAY+"the auction house, similar to the normal AH")); -// texts[11].put(new Vector2f(0.55f, 0.72f), Utils.createList( -// EnumChatFormatting.GOLD+"NeuAH", -// EnumChatFormatting.GRAY+"Clicking on an item will bring up the auction view", -// EnumChatFormatting.GRAY+"Here you can viewer the buyer/seller and place bids or make purchases", -// EnumChatFormatting.GRAY+"Trying to purchase an item will result in a confirmation GUI similar to the normal AH")); -// texts[12].put(new Vector2f(0.28f, 0.82f), Utils.createList( -// EnumChatFormatting.GOLD+"Profile Viewer", -// EnumChatFormatting.GRAY+"Access the profile viewer using /neuprofile (ign) or /pv (ign)", -// EnumChatFormatting.GRAY+"This is the main page of the profile viewer", -// EnumChatFormatting.GRAY+"This page contains basic information like stats and skill levels")); -// texts[12].put(new Vector2f(0.72f, 0.55f), Utils.createList( -// EnumChatFormatting.GOLD+"Profile Viewer", -// EnumChatFormatting.GRAY+"Click the button on the left to switch profiles and use the bar on the right to switch players")); -// texts[13].put(new Vector2f(0.28f, 0.82f), Utils.createList( -// EnumChatFormatting.GOLD+"Profile Viewer", -// EnumChatFormatting.GRAY+"This is the extra info page of the profile viewer", -// EnumChatFormatting.GRAY+"This page contains all the small bits of information about a player that don't fit anywhere else")); -// texts[14].put(new Vector2f(0.28f, 0.82f), Utils.createList( -// EnumChatFormatting.GOLD+"Profile Viewer", -// EnumChatFormatting.GRAY+"This is the inventories page of the profile viewer", -// EnumChatFormatting.GRAY+"Click on the inventory icons in the top-left or use your keyboard to switch the inventory type", -// EnumChatFormatting.GRAY+"The bar on the bottom-left searches the current inventory for matching items")); -// texts[15].put(new Vector2f(0.28f, 0.82f), Utils.createList( -// EnumChatFormatting.GOLD+"Profile Viewer", -// EnumChatFormatting.GRAY+"This is the collections page of the profile viewer", -// EnumChatFormatting.GRAY+"Click on the icons on the left or use the keyboard shortcut to switch collection type")); -// texts[16].put(new Vector2f(0.28f, 0.82f), Utils.createList( -// EnumChatFormatting.GOLD+"Profile Viewer", -// EnumChatFormatting.GRAY+"This is the pets page of the profile viewer", -// EnumChatFormatting.GRAY+"Click to select the pet on the left", -// EnumChatFormatting.GRAY+"The selected pet's stats will display on the right")); -// texts[17].put(new Vector2f(0.27f, 0.40f), Utils.createList( -// EnumChatFormatting.GOLD+"Overlay", -// EnumChatFormatting.GRAY+"Rearrange certain GUI elements of the main overlay using /neuoverlay", -// EnumChatFormatting.GRAY+"If you accidentally move them off screen, use the button in the top left to reset the GUI")); -// } + // static { + // for(int i=0; i<18; i++) { + // texts[i] = new HashMap<>(); + // } + // texts[0].put(new Vector2f(0.73f, 0.60f), Utils.createList( + // EnumChatFormatting.GOLD+"Itemlist", + // EnumChatFormatting.GRAY+"Here you will find a list of (most) skyblock items", + // EnumChatFormatting.GRAY+"The itemlist can be accessed by opening your inventory or most menus while on skyblock")); + // texts[1].put(new Vector2f(0.73f, 0.16f), Utils.createList( + // EnumChatFormatting.GOLD+"Itemlist", + // EnumChatFormatting.GRAY+"These are the page controls for the itemlist", + // EnumChatFormatting.GRAY+"Clicking these controls will bring you to other pages of the itemlist")); + // texts[2].put(new Vector2f(0.73f, 1.05f), Utils.createList( + // EnumChatFormatting.GOLD+"Itemlist", + // EnumChatFormatting.GRAY+"These are the sorting controls for the itemlist", + // EnumChatFormatting.GRAY+"The buttons on the left control the ordering of the items", + // EnumChatFormatting.GRAY+"The buttons on the right can be used to filter a certain type of item")); + // texts[3].put(new Vector2f(0.39f, 1.04f), Utils.createList( + // EnumChatFormatting.GOLD+"Itemlist", + // EnumChatFormatting.GRAY+"This is the search bar for the itemlist", + // EnumChatFormatting.GRAY+"Double-click the bar to enable inventory search mode", + // EnumChatFormatting.GRAY+"The button on the left opens up the mod settings", + // EnumChatFormatting.GRAY+"The button on the right displays this tutorial")); + // texts[4].put(new Vector2f(0.39f, 0.99f), Utils.createList( + // EnumChatFormatting.GOLD+"QuickCommands", + // EnumChatFormatting.GRAY+"These are the QuickCommands", + // EnumChatFormatting.GRAY+"They let you warp around or access certain menus more easily")); + // texts[5].put(new Vector2f(0.7f, 0.71f), Utils.createList( + // EnumChatFormatting.GOLD+"Itemlist", + // EnumChatFormatting.GRAY+"Hover over an item in the list to display it's lore", + // EnumChatFormatting.GRAY+"Left clicking some items will display the recipe for that item", + // EnumChatFormatting.GRAY+"Right clicking some items will display a wiki page for that item", + // EnumChatFormatting.GRAY+"'F' will favourite an item, putting it to the top of the itemlist")); + // texts[6].put(new Vector2f(0.17f, 0.21f), Utils.createList( + // EnumChatFormatting.GOLD+"Collection Log", + // EnumChatFormatting.GRAY+"This is the collection log. It can be accessed using the /neucl command, or via the QuickCommand", + // EnumChatFormatting.GRAY+"The collection log keeps track of all items that enter your inventory while you are playing skyblock", + // EnumChatFormatting.GRAY+"If you are a completionist, this feature is for you")); + // texts[7].put(new Vector2f(0.05f, 0.13f), Utils.createList( + // EnumChatFormatting.GOLD+"Collection Log", + // EnumChatFormatting.GRAY+"Clicking on 'Filter' will change the items that", + // EnumChatFormatting.GRAY+"appear in the list")); + // texts[8].put(new Vector2f(0.35f, 0.74f), Utils.createList( + // EnumChatFormatting.GOLD+"NeuAH", + // EnumChatFormatting.GRAY+"This is the NEU Auction House (NeuAH)", + // EnumChatFormatting.GRAY+"This AH can be accessed from anywhere using the /neuah command, or via the QuickCommand", + // EnumChatFormatting.GRAY+"The items here refresh automatically, so there is no need to close the GUI to see the latest auctions", + // EnumChatFormatting.GRAY+"Sometimes, you might have to wait until the list is populated with items from the API")); + // texts[9].put(new Vector2f(0.41f, 0.40f), Utils.createList( + // EnumChatFormatting.GOLD+"NeuAH", + // EnumChatFormatting.GRAY+"These tabs control the items that appear in NeuAH", + // EnumChatFormatting.GRAY+"You can find the main categories on the top of the GUI and subcategories appear on the side of the GUI once a main category is selected")); + // texts[10].put(new Vector2f(0.57f, 0.38f), Utils.createList( + // EnumChatFormatting.GOLD+"NeuAH", + // EnumChatFormatting.GRAY+"Search for items using the search bar at the top", + // EnumChatFormatting.GRAY+"Boolean operators such as &, | or ! work here.")); + // texts[10].put(new Vector2f(0.40f, 0.72f), Utils.createList( + // EnumChatFormatting.GOLD+"NeuAH", + // EnumChatFormatting.GRAY+"This toolbar contains many useful features", + // EnumChatFormatting.GRAY+"which control the sorting and ordering of", + // EnumChatFormatting.GRAY+"the auction house, similar to the normal AH")); + // texts[11].put(new Vector2f(0.55f, 0.72f), Utils.createList( + // EnumChatFormatting.GOLD+"NeuAH", + // EnumChatFormatting.GRAY+"Clicking on an item will bring up the auction view", + // EnumChatFormatting.GRAY+"Here you can viewer the buyer/seller and place bids or make purchases", + // EnumChatFormatting.GRAY+"Trying to purchase an item will result in a confirmation GUI similar to the normal AH")); + // texts[12].put(new Vector2f(0.28f, 0.82f), Utils.createList( + // EnumChatFormatting.GOLD+"Profile Viewer", + // EnumChatFormatting.GRAY+"Access the profile viewer using /neuprofile (ign) or /pv (ign)", + // EnumChatFormatting.GRAY+"This is the main page of the profile viewer", + // EnumChatFormatting.GRAY+"This page contains basic information like stats and skill levels")); + // texts[12].put(new Vector2f(0.72f, 0.55f), Utils.createList( + // EnumChatFormatting.GOLD+"Profile Viewer", + // EnumChatFormatting.GRAY+"Click the button on the left to switch profiles and use the bar on the right to switch players")); + // texts[13].put(new Vector2f(0.28f, 0.82f), Utils.createList( + // EnumChatFormatting.GOLD+"Profile Viewer", + // EnumChatFormatting.GRAY+"This is the extra info page of the profile viewer", + // EnumChatFormatting.GRAY+"This page contains all the small bits of information about a player that don't fit anywhere else")); + // texts[14].put(new Vector2f(0.28f, 0.82f), Utils.createList( + // EnumChatFormatting.GOLD+"Profile Viewer", + // EnumChatFormatting.GRAY+"This is the inventories page of the profile viewer", + // EnumChatFormatting.GRAY+"Click on the inventory icons in the top-left or use your keyboard to switch the inventory type", + // EnumChatFormatting.GRAY+"The bar on the bottom-left searches the current inventory for matching items")); + // texts[15].put(new Vector2f(0.28f, 0.82f), Utils.createList( + // EnumChatFormatting.GOLD+"Profile Viewer", + // EnumChatFormatting.GRAY+"This is the collections page of the profile viewer", + // EnumChatFormatting.GRAY+"Click on the icons on the left or use the keyboard shortcut to switch collection type")); + // texts[16].put(new Vector2f(0.28f, 0.82f), Utils.createList( + // EnumChatFormatting.GOLD+"Profile Viewer", + // EnumChatFormatting.GRAY+"This is the pets page of the profile viewer", + // EnumChatFormatting.GRAY+"Click to select the pet on the left", + // EnumChatFormatting.GRAY+"The selected pet's stats will display on the right")); + // texts[17].put(new Vector2f(0.27f, 0.40f), Utils.createList( + // EnumChatFormatting.GOLD+"Overlay", + // EnumChatFormatting.GRAY+"Rearrange certain GUI elements of the main overlay using /neuoverlay", + // EnumChatFormatting.GRAY+"If you accidentally move them off screen, use the button in the top left to reset the GUI")); + // } } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinAbstractClientPlayer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinAbstractClientPlayer.java index ec2843eb..bc2ae63a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinAbstractClientPlayer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinAbstractClientPlayer.java @@ -10,7 +10,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(AbstractClientPlayer.class) public class MixinAbstractClientPlayer { - @Inject(method = "hasSkin", at = @At("HEAD"), cancellable = true) public void hasSkin(CallbackInfoReturnable<Boolean> cir) { AbstractClientPlayer $this = (AbstractClientPlayer) (Object) this; @@ -36,5 +35,4 @@ public class MixinAbstractClientPlayer { cir.setReturnValue(skin.skinny ? "slim" : "default"); } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinContainer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinContainer.java index 28a4a6fd..18c06482 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinContainer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinContainer.java @@ -10,10 +10,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(Container.class) public class MixinContainer { - @Inject(method = "putStacksInSlots", at = @At("RETURN")) public void putStacksInSlots(ItemStack[] stacks, CallbackInfo ci) { EnchantingSolvers.processInventoryContents(false); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEffectRenderer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEffectRenderer.java index efb1824e..85866e3d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEffectRenderer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEffectRenderer.java @@ -11,7 +11,6 @@ import org.spongepowered.asm.mixin.injection.Redirect; @Mixin(EffectRenderer.class) public class MixinEffectRenderer { - @Redirect(method = "renderParticles", at = @At( value = "INVOKE", target = "Lnet/minecraft/client/renderer/GlStateManager;enableBlend()V") @@ -26,5 +25,4 @@ public class MixinEffectRenderer { EntityFX.interpPosZ = currentPosition.z; } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEntityPlayer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEntityPlayer.java index 3d930623..218e03eb 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEntityPlayer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEntityPlayer.java @@ -10,7 +10,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin({EntityPlayer.class}) public abstract class MixinEntityPlayer { - @Inject(method = "isWearing", at = @At("HEAD"), cancellable = true) public void isWearing(EnumPlayerModelParts part, CallbackInfoReturnable<Boolean> cir) { if (part == EnumPlayerModelParts.CAPE) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEntityPlayerSP.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEntityPlayerSP.java index 70db4b2c..f6286323 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEntityPlayerSP.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEntityPlayerSP.java @@ -14,7 +14,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(EntityPlayerSP.class) public class MixinEntityPlayerSP { - @Inject(method = "dropOneItem", at = @At("HEAD"), cancellable = true) public void dropOneItem(CallbackInfoReturnable<EntityItem> ci) { if (SBInfo.getInstance().isInDungeon) { @@ -28,5 +27,4 @@ public class MixinEntityPlayerSP { "NotEnoughUpdates has prevented you from dropping that locked item!")); } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEntityRenderer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEntityRenderer.java index 5a2cac8a..ed71bbd6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEntityRenderer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEntityRenderer.java @@ -24,7 +24,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(EntityRenderer.class) public abstract class MixinEntityRenderer { - @Shadow protected abstract float getFOVModifier(float partialTicks, boolean useFOVSetting); @@ -158,5 +157,4 @@ public abstract class MixinEntityRenderer { } return d2; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiChest.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiChest.java index fada73ed..d7168aa6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiChest.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiChest.java @@ -11,7 +11,6 @@ import org.spongepowered.asm.mixin.injection.Redirect; @Mixin({GuiChest.class}) public class MixinGuiChest { - private static final String TARGET = "Lnet/minecraft/client/renderer/texture/TextureManager;" + "bindTexture(Lnet/minecraft/util/ResourceLocation;)V"; @@ -39,5 +38,4 @@ public class MixinGuiChest { } catch (Exception ignored) {} return fontRenderer.drawString(text, x, y, BetterContainers.isOverriding() ? BetterContainers.getTextColour() : color); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java index 2e79dea4..680b356e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java @@ -37,7 +37,6 @@ import java.util.concurrent.atomic.AtomicBoolean; @Mixin(GuiContainer.class) public abstract class MixinGuiContainer extends GuiScreen { - private static boolean hasProfileViewerStack = false; private static final ItemStack profileViewerStack = Utils.createItemStack(Item.getItemFromBlock(Blocks.command_block), EnumChatFormatting.GREEN + "Profile Viewer", diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiIngame.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiIngame.java index 3842a3c4..160e79c4 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiIngame.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiIngame.java @@ -19,7 +19,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin({GuiIngame.class}) public class MixinGuiIngame { - private static final String TARGET = "Lnet/minecraft/scoreboard/ScorePlayerTeam;" + "formatPlayerName(Lnet/minecraft/scoreboard/Team;Ljava/lang/String;)Ljava/lang/String;"; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiInventory.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiInventory.java index 4f481d4f..8d670f68 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiInventory.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiInventory.java @@ -10,7 +10,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(GuiInventory.class) public class MixinGuiInventory { - @Inject(method = "drawGuiContainerForegroundLayer", at = @At("HEAD"), cancellable = true) protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY, CallbackInfo ci) { if (NotEnoughUpdates.INSTANCE.config.inventoryButtons.hideCrafting || @@ -18,5 +17,4 @@ public class MixinGuiInventory { ci.cancel(); } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiScreen.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiScreen.java index 6dcad539..06e952c6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiScreen.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiScreen.java @@ -9,10 +9,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(GuiScreen.class) public class MixinGuiScreen { - @Inject(method = "sendChatMessage(Ljava/lang/String;Z)V", at = @At("HEAD")) public void onSendChatMessage(String message, boolean addToChat, CallbackInfo ci) { SBInfo.getInstance().onSendChatMessage(message); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinInventoryEffectRenderer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinInventoryEffectRenderer.java index 0885502d..d3251920 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinInventoryEffectRenderer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinInventoryEffectRenderer.java @@ -8,7 +8,6 @@ import org.spongepowered.asm.mixin.injection.ModifyVariable; @Mixin({InventoryEffectRenderer.class}) public class MixinInventoryEffectRenderer { - @ModifyVariable(method = "updateActivePotionEffects", at = @At(value = "STORE")) public boolean hasVisibleEffect_updateActivePotionEffects(boolean hasVisibleEffect) { if (NotEnoughUpdates.INSTANCE.config.misc.hidePotionEffect && @@ -18,5 +17,4 @@ public class MixinInventoryEffectRenderer { return hasVisibleEffect; } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinInventoryPlayer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinInventoryPlayer.java index a9cb71da..e88c505b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinInventoryPlayer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinInventoryPlayer.java @@ -10,13 +10,11 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(InventoryPlayer.class) public class MixinInventoryPlayer { - @Inject(method = "changeCurrentItem", at = @At("RETURN")) public void changeCurrentItemReturn(int direction, CallbackInfo ci) { InventoryPlayer $this = (InventoryPlayer) (Object) this; $this.currentItem = InventoryStorageSelector.getInstance().onScroll(direction, $this.currentItem); - } @Inject(method = "changeCurrentItem", at = @At("HEAD")) @@ -25,5 +23,4 @@ public class MixinInventoryPlayer { SlotLocking.getInstance().changedSlot($this.currentItem); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinItemCameraTransforms.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinItemCameraTransforms.java index 94277c54..d8320463 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinItemCameraTransforms.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinItemCameraTransforms.java @@ -9,10 +9,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(ItemCameraTransforms.class) public class MixinItemCameraTransforms { - @Inject(method = "applyTransform", at = @At("HEAD")) public void applyTransform(ItemCameraTransforms.TransformType type, CallbackInfo ci) { CustomSkulls.mostRecentTransformType = type; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinItemRenderer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinItemRenderer.java index 8ea0642e..d700c475 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinItemRenderer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinItemRenderer.java @@ -10,7 +10,6 @@ import org.spongepowered.asm.mixin.injection.Redirect; @Mixin(ItemRenderer.class) public abstract class MixinItemRenderer { - @Redirect(method = "updateEquippedItem", at = @At( value = "INVOKE", target = "Lnet/minecraft/entity/player/InventoryPlayer;getCurrentItem()Lnet/minecraft/item/ItemStack;" @@ -21,5 +20,4 @@ public abstract class MixinItemRenderer { } return player.getCurrentItem(); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinItemStack.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinItemStack.java index 6ba253af..927bd642 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinItemStack.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinItemStack.java @@ -12,7 +12,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin({ItemStack.class}) public class MixinItemStack { - @Inject(method = "hasEffect", at = @At("HEAD"), cancellable = true) public void hasEffect(CallbackInfoReturnable<Boolean> cir) { if (Utils.getHasEffectOverride()) { @@ -47,5 +46,4 @@ public class MixinItemStack { } } catch (Exception ignored) {} } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLayerArmorBase.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLayerArmorBase.java index 0a56a9ce..40a4028e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLayerArmorBase.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLayerArmorBase.java @@ -15,7 +15,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(LayerArmorBase.class) public abstract class MixinLayerArmorBase<T extends ModelBase> { - private static String customEnchGlint = null; @Redirect(method = "renderLayer", @@ -62,5 +61,4 @@ public abstract class MixinLayerArmorBase<T extends ModelBase> { return item.getColor(stack); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLayerCustomHead.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLayerCustomHead.java index 77e49e7b..c9552317 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLayerCustomHead.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLayerCustomHead.java @@ -17,7 +17,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(LayerCustomHead.class) public class MixinLayerCustomHead { - private static String customGlintColour = null; @Inject(method = "doRenderLayer", at = @At("HEAD")) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLoadingScreenRenderer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLoadingScreenRenderer.java index fff9f29d..d98add96 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLoadingScreenRenderer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLoadingScreenRenderer.java @@ -9,12 +9,10 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(LoadingScreenRenderer.class) public class MixinLoadingScreenRenderer { - @Inject(method = "setLoadingProgress", at = @At(value = "HEAD"), cancellable = true) public void setLoadingProgress(int progress, CallbackInfo ci) { if (progress < 0 && !FancyPortals.shouldRenderLoadingScreen()) { ci.cancel(); } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMinecraft.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMinecraft.java index 4b667218..953aa722 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMinecraft.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMinecraft.java @@ -10,7 +10,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(Minecraft.class) public class MixinMinecraft { - //Commented as they weren't being loaded before /*@Shadow public WorldClient theWorld; @@ -38,5 +37,4 @@ public class MixinMinecraft { public void currentItemMixin(CallbackInfo ci) { SlotLocking.getInstance().changedSlot(Minecraft.getMinecraft().thePlayer.inventory.currentItem); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMouseHelper.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMouseHelper.java index 8e14c583..5c9ba5a1 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMouseHelper.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMouseHelper.java @@ -10,7 +10,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(MouseHelper.class) public class MixinMouseHelper { - @Inject(method = {"ungrabMouseCursor"}, at = {@At("HEAD")}, cancellable = true) public void ungrabMouseCursor(final CallbackInfo ci) { if (System.currentTimeMillis() - NEUEventListener.lastGuiClosed < 150L) { @@ -18,5 +17,4 @@ public class MixinMouseHelper { Mouse.setGrabbed(false); } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java index c67d3a07..1ddf1933 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java @@ -93,5 +93,4 @@ public class MixinNetHandlerPlayClient { SBInfo.getInstance().header = packetIn.getHeader().getFormattedText().length() == 0 ? null : packetIn.getHeader(); SBInfo.getInstance().footer = packetIn.getFooter().getFormattedText().length() == 0 ? null : packetIn.getFooter(); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinPlayerControllerMP.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinPlayerControllerMP.java index 4e260a9c..78130cb4 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinPlayerControllerMP.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinPlayerControllerMP.java @@ -11,7 +11,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(PlayerControllerMP.class) public class MixinPlayerControllerMP { - @Inject(method = "clickBlock", at = @At("HEAD"), cancellable = true) public void clickBlock(BlockPos loc, EnumFacing face, CallbackInfoReturnable<Boolean> cir) { ItemCooldowns.blockClicked(loc); @@ -20,5 +19,4 @@ public class MixinPlayerControllerMP { ((PlayerControllerMP)(Object)this).resetBlockRemoving(); }*/ } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRender.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRender.java index 25cc13cc..85f386d6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRender.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRender.java @@ -15,7 +15,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(Render.class) public class MixinRender { - @Inject(method = "bindEntityTexture", at = @At("HEAD"), cancellable = true) public void bindEntityTexture(Entity entity, CallbackInfoReturnable<Boolean> cir) { if (entity instanceof EntityBat && DungeonBlocks.isOverriding()) { @@ -27,5 +26,4 @@ public class MixinRender { } } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderFish.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderFish.java index 9b43e675..d46ec935 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderFish.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderFish.java @@ -26,7 +26,6 @@ import java.awt.*; @Mixin(RenderFish.class) public abstract class MixinRenderFish extends Render<EntityFishHook> { - protected MixinRenderFish(RenderManager renderManager) { super(renderManager); } @@ -146,5 +145,4 @@ public abstract class MixinRenderFish extends Render<EntityFishHook> { private static double mathLerp(double var1, double var2, double var3) { return var2 + var1 * (var3 - var2); } - }
\ No newline at end of file diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderGlobal.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderGlobal.java index c4eaee15..3fd37581 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderGlobal.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderGlobal.java @@ -14,7 +14,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(RenderGlobal.class) public class MixinRenderGlobal { - @ModifyVariable(method = "setupTerrain", at = @At(value = "STORE"), ordinal = 4) public double setupTerrain_d0(double d3) { Vector3f currentPosition = CustomItemEffects.INSTANCE.getCurrentPosition(); @@ -105,5 +104,4 @@ public class MixinRenderGlobal { } return d2; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderItem.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderItem.java index 765437c8..7df039cc 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderItem.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderItem.java @@ -29,7 +29,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin({RenderItem.class}) public abstract class MixinRenderItem { - private static void func_181565_a(WorldRenderer w, int x, int y, float width, int height, int r, int g, int b, int a) { w.begin(7, DefaultVertexFormats.POSITION_COLOR); @@ -273,5 +272,4 @@ public abstract class MixinRenderItem { GlStateManager.enableDepth(); } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderList.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderList.java index 1e79c9ec..72eea491 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderList.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderList.java @@ -11,7 +11,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin({RenderList.class}) public abstract class MixinRenderList { - @Inject(method = "renderChunkLayer", at = @At("HEAD")) public void renderChunkLayer(EnumWorldBlockLayer layer, CallbackInfo ci) { if (DungeonBlocks.textureExists()) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRendererLivingEntity.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRendererLivingEntity.java index ea9f808a..8fdbc2ee 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRendererLivingEntity.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRendererLivingEntity.java @@ -15,7 +15,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(RendererLivingEntity.class) public abstract class MixinRendererLivingEntity<T extends EntityLivingBase> { - @Redirect(method = "renderName", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/EntityLivingBase;getDisplayName()Lnet/minecraft/util/IChatComponent;")) public IChatComponent renderName_getDisplayName(EntityLivingBase entity) { @@ -33,5 +32,4 @@ public abstract class MixinRendererLivingEntity<T extends EntityLivingBase> { cir.setReturnValue(0x80ff9500); } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTextureManager.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTextureManager.java index 1bbf3a88..502d5a7f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTextureManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTextureManager.java @@ -10,12 +10,10 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(TextureManager.class) public class MixinTextureManager { - @Inject(method = "bindTexture", at = @At("HEAD"), cancellable = true) public void bindTexture(ResourceLocation location, CallbackInfo ci) { if (ItemCustomizeManager.disableTextureBinding) { ci.cancel(); } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTileEntitySkullRenderer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTileEntitySkullRenderer.java index 57742352..da573f43 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTileEntitySkullRenderer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTileEntitySkullRenderer.java @@ -11,7 +11,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(TileEntitySkullRenderer.class) public class MixinTileEntitySkullRenderer { - @Inject(method = "renderSkull", at = @At("HEAD"), cancellable = true) public void renderSkull(float xOffset, float yOffset, float zOffset, EnumFacing placedDirection, float rotationDeg, int skullType, GameProfile skullOwner, int damage, CallbackInfo ci) { @@ -19,5 +18,4 @@ public class MixinTileEntitySkullRenderer { ci.cancel(); } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTileEntitySpecialRenderer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTileEntitySpecialRenderer.java index 324a7043..35607a06 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTileEntitySpecialRenderer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTileEntitySpecialRenderer.java @@ -13,7 +13,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin({TileEntitySpecialRenderer.class}) public abstract class MixinTileEntitySpecialRenderer { - @Inject(method = "bindTexture", at = @At("HEAD"), cancellable = true) public void bindTexture(ResourceLocation location, CallbackInfo info) { if (DungeonBlocks.isOverriding()) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinVboRenderList.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinVboRenderList.java index 2a958678..9d8f7124 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinVboRenderList.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinVboRenderList.java @@ -11,7 +11,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin({VboRenderList.class}) public abstract class MixinVboRenderList { - @Inject(method = "renderChunkLayer", at = @At("HEAD")) public void renderChunkLayer(EnumWorldBlockLayer layer, CallbackInfo ci) { if (DungeonBlocks.textureExists()) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinWorld.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinWorld.java index 2985ef3a..30b217db 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinWorld.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinWorld.java @@ -36,5 +36,4 @@ public class MixinWorld { cir.setReturnValue(BiomeGenBase.coldBeach); } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinWorldClient.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinWorldClient.java index 459ebe7f..3edcc0da 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinWorldClient.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinWorldClient.java @@ -11,7 +11,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(WorldClient.class) public class MixinWorldClient { - @Inject(method = "addEntityToWorld", at = @At("HEAD")) public void addEntityToWorld(int entityID, Entity entityToSpawn, CallbackInfo ci) { FishingHelper.getInstance().addEntity(entityID, entityToSpawn); @@ -21,5 +20,4 @@ public class MixinWorldClient { public void removeEntityFromWorld(int entityID, CallbackInfoReturnable<Entity> cir) { FishingHelper.getInstance().removeEntity(entityID); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java b/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java index 8dce4cc1..31930e77 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java @@ -26,7 +26,6 @@ import java.util.List; import java.util.Map; public class NEUConfig extends Config { - private void editOverlay(String activeConfig, TextOverlay overlay, Position position) { Vector2f size = overlay.getDummySize(); int width = (int) size.x; @@ -57,8 +56,8 @@ public class NEUConfig extends Config { case 2: Minecraft.getMinecraft().displayGuiScreen(new GuiPositionEditor( NotEnoughUpdates.INSTANCE.config.mining.drillFuelBarPosition, - NotEnoughUpdates.INSTANCE.config.mining.drillFuelBarWidth, 12, () -> { - }, () -> {}, () -> NotEnoughUpdates.INSTANCE.openGui = new GuiScreenElementWrapper(NEUConfigEditor.editor))); + NotEnoughUpdates.INSTANCE.config.mining.drillFuelBarWidth, 12, () -> {}, + () -> {}, () -> NotEnoughUpdates.INSTANCE.openGui = new GuiScreenElementWrapper(NEUConfigEditor.editor))); return; case 3: editOverlay(activeConfigCategory, OverlayManager.farmingOverlay, skillOverlays.farmingPosition); @@ -363,17 +362,17 @@ public class NEUConfig extends Config { } private static ArrayList<String> createDefaultQuickCommands() { - ArrayList<String> arr = new ArrayList<>(); - arr.add("/warp home:Warp Home:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzljODg4MWU0MjkxNWE5ZDI5YmI2MWExNmZiMjZkMDU5OTEzMjA0ZDI2NWRmNWI0MzliM2Q3OTJhY2Q1NiJ9fX0="); - arr.add("/warp hub:Warp Hub:eyJ0aW1lc3RhbXAiOjE1NTkyMTU0MTY5MDksInByb2ZpbGVJZCI6IjQxZDNhYmMyZDc0OTQwMGM5MDkwZDU0MzRkMDM4MzFiIiwicHJvZmlsZU5hbWUiOiJNZWdha2xvb24iLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2Q3Y2M2Njg3NDIzZDA1NzBkNTU2YWM1M2UwNjc2Y2I1NjNiYmRkOTcxN2NkODI2OWJkZWJlZDZmNmQ0ZTdiZjgifX19"); - arr.add("/warp dungeon_hub:Dungeon Hub:eyJ0aW1lc3RhbXAiOjE1Nzg0MDk0MTMxNjksInByb2ZpbGVJZCI6IjQxZDNhYmMyZDc0OTQwMGM5MDkwZDU0MzRkMDM4MzFiIiwicHJvZmlsZU5hbWUiOiJNZWdha2xvb24iLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzliNTY4OTViOTY1OTg5NmFkNjQ3ZjU4NTk5MjM4YWY1MzJkNDZkYjljMWIwMzg5YjhiYmViNzA5OTlkYWIzM2QiLCJtZXRhZGF0YSI6eyJtb2RlbCI6InNsaW0ifX19fQ=="); - arr.add("/craft:Crafting Table:CRAFTING_TABLE"); - arr.add("/storage:Storage:CHEST"); - arr.add("/wardrobe:Wardrobe:LEATHER_CHESTPLATE"); - arr.add("/pets:Pets:BONE"); - arr.add("neuah:NEU Auction House:GOLD_BLOCK"); - arr.add("/bz:Bazaar:GOLD_BARDING"); - return arr; + return new ArrayList<String>() {{ + add("/warp home:Warp Home:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzljODg4MWU0MjkxNWE5ZDI5YmI2MWExNmZiMjZkMDU5OTEzMjA0ZDI2NWRmNWI0MzliM2Q3OTJhY2Q1NiJ9fX0="); + add("/warp hub:Warp Hub:eyJ0aW1lc3RhbXAiOjE1NTkyMTU0MTY5MDksInByb2ZpbGVJZCI6IjQxZDNhYmMyZDc0OTQwMGM5MDkwZDU0MzRkMDM4MzFiIiwicHJvZmlsZU5hbWUiOiJNZWdha2xvb24iLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2Q3Y2M2Njg3NDIzZDA1NzBkNTU2YWM1M2UwNjc2Y2I1NjNiYmRkOTcxN2NkODI2OWJkZWJlZDZmNmQ0ZTdiZjgifX19"); + add("/warp dungeon_hub:Dungeon Hub:eyJ0aW1lc3RhbXAiOjE1Nzg0MDk0MTMxNjksInByb2ZpbGVJZCI6IjQxZDNhYmMyZDc0OTQwMGM5MDkwZDU0MzRkMDM4MzFiIiwicHJvZmlsZU5hbWUiOiJNZWdha2xvb24iLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzliNTY4OTViOTY1OTg5NmFkNjQ3ZjU4NTk5MjM4YWY1MzJkNDZkYjljMWIwMzg5YjhiYmViNzA5OTlkYWIzM2QiLCJtZXRhZGF0YSI6eyJtb2RlbCI6InNsaW0ifX19fQ=="); + add("/craft:Crafting Table:CRAFTING_TABLE"); + add("/storage:Storage:CHEST"); + add("/wardrobe:Wardrobe:LEATHER_CHESTPLATE"); + add("/pets:Pets:BONE"); + add("neuah:NEU Auction House:GOLD_BLOCK"); + add("/bz:Bazaar:GOLD_BARDING"); + }}; } public HiddenProfileSpecific getProfileSpecific() { @@ -452,64 +451,64 @@ public class NEUConfig extends Config { } public static List<InventoryButton> createDefaultInventoryButtons() { - List<InventoryButton> buttons = new ArrayList<>(); - //Below crafting - buttons.add(new InventoryButton(87, 63, null, true, false, false, 0, "")); - buttons.add(new InventoryButton(87 + 21, 63, null, true, false, false, 0, "")); - buttons.add(new InventoryButton(87 + 21 * 2, 63, null, true, false, false, 0, "")); - buttons.add(new InventoryButton(87 + 21 * 3, 63, null, true, false, false, 0, "")); - - //Above crafting - buttons.add(new InventoryButton(87, 5, null, true, false, false, 0, "")); - buttons.add(new InventoryButton(87 + 21, 5, null, true, false, false, 0, "")); - buttons.add(new InventoryButton(87 + 21 * 2, 5, null, true, false, false, 0, "")); - buttons.add(new InventoryButton(87 + 21 * 3, 5, null, true, false, false, 0, "")); - - //Crafting square - buttons.add(new InventoryButton(87, 25, null, true, false, false, 0, "")); - buttons.add(new InventoryButton(87 + 18, 25, null, true, false, false, 0, "")); - buttons.add(new InventoryButton(87, 25 + 18, null, true, false, false, 0, "")); - buttons.add(new InventoryButton(87 + 18, 25 + 18, null, true, false, false, 0, "")); - - //Crafting result - buttons.add(new InventoryButton(143, 35, null, true, false, false, 0, "")); - - //Player menu area - buttons.add(new InventoryButton(60, 8, null, true, false, false, 0, "")); - buttons.add(new InventoryButton(60, 60, null, true, false, false, 0, "")); - buttons.add(new InventoryButton(26, 8, null, true, false, false, 0, "")); - buttons.add(new InventoryButton(26, 60, null, true, false, false, 0, "")); - - //Right side - for (int i = 0; i < 8; i++) { - int y = 2 + 20 * i; - if (y < 80) { - buttons.add(new InventoryButton(2, 2 + 20 * i, null, false, true, false, 0, "")); - } else { - buttons.add(new InventoryButton(2, 2 + 20 * i - 166, null, false, true, true, 0, "")); + return new ArrayList<InventoryButton>() {{ + //Below crafting + add(new InventoryButton(87, 63, null, true, false, false, 0, "")); + add(new InventoryButton(87 + 21, 63, null, true, false, false, 0, "")); + add(new InventoryButton(87 + 21 * 2, 63, null, true, false, false, 0, "")); + add(new InventoryButton(87 + 21 * 3, 63, null, true, false, false, 0, "")); + + //Above crafting + add(new InventoryButton(87, 5, null, true, false, false, 0, "")); + add(new InventoryButton(87 + 21, 5, null, true, false, false, 0, "")); + add(new InventoryButton(87 + 21 * 2, 5, null, true, false, false, 0, "")); + add(new InventoryButton(87 + 21 * 3, 5, null, true, false, false, 0, "")); + + //Crafting square + add(new InventoryButton(87, 25, null, true, false, false, 0, "")); + add(new InventoryButton(87 + 18, 25, null, true, false, false, 0, "")); + add(new InventoryButton(87, 25 + 18, null, true, false, false, 0, "")); + add(new InventoryButton(87 + 18, 25 + 18, null, true, false, false, 0, "")); + + //Crafting result + add(new InventoryButton(143, 35, null, true, false, false, 0, "")); + + //Player menu area + add(new InventoryButton(60, 8, null, true, false, false, 0, "")); + add(new InventoryButton(60, 60, null, true, false, false, 0, "")); + add(new InventoryButton(26, 8, null, true, false, false, 0, "")); + add(new InventoryButton(26, 60, null, true, false, false, 0, "")); + + //Right side + for (int i = 0; i < 8; i++) { + int y = 2 + 20 * i; + if (y < 80) { + add(new InventoryButton(2, 2 + 20 * i, null, false, true, false, 0, "")); + } else { + add(new InventoryButton(2, 2 + 20 * i - 166, null, false, true, true, 0, "")); + } } - } - //Top side - for (int i = 0; i < 8; i++) { - buttons.add(new InventoryButton(4 + 21 * i, -19, null, false, false, false, 0, "")); - } + //Top side + for (int i = 0; i < 8; i++) { + add(new InventoryButton(4 + 21 * i, -19, null, false, false, false, 0, "")); + } - //Left side - for (int i = 0; i < 8; i++) { - int y = 2 + 20 * i; - if (y < 80) { - buttons.add(new InventoryButton(-19, 2 + 20 * i, null, false, false, false, 0, "")); - } else { - buttons.add(new InventoryButton(-19, 2 + 20 * i - 166, null, false, false, true, 0, "")); + //Left side + for (int i = 0; i < 8; i++) { + int y = 2 + 20 * i; + if (y < 80) { + add(new InventoryButton(-19, 2 + 20 * i, null, false, false, false, 0, "")); + } else { + add(new InventoryButton(-19, 2 + 20 * i - 166, null, false, false, true, 0, "")); + } } - } - //Bottom side - for (int i = 0; i < 8; i++) { - buttons.add(new InventoryButton(4 + 21 * i, 2, null, false, false, true, 0, "")); - } - return buttons; + //Bottom side + for (int i = 0; i < 8; i++) { + add(new InventoryButton(4 + 21 * i, 2, null, false, false, true, 0, "")); + } + }}; } public static class InventoryButton { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfigEditor.java b/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfigEditor.java index 67e61114..da94d1e1 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfigEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfigEditor.java @@ -33,7 +33,6 @@ import java.util.*; import static io.github.moulberry.notenoughupdates.util.GuiTextures.*; public class NEUConfigEditor extends GuiElement { - public static NEUConfigEditor editor = new NEUConfigEditor(NotEnoughUpdates.INSTANCE.config); private static final ResourceLocation[] socialsIco = new ResourceLocation[]{ 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 3e602b08..0cae7751 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 @@ -4,7 +4,6 @@ import com.google.gson.annotations.Expose; import io.github.moulberry.notenoughupdates.core.config.annotations.*; public class AHTweaks { - @ConfigOption( name = "Search GUI", desc = "" @@ -93,5 +92,4 @@ public class AHTweaks { @ConfigEditorBoolean @ConfigAccordionId(id = 2) public boolean enableSortWarning = true; - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Dungeons.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Dungeons.java index ca1ae0d8..4e83410d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Dungeons.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Dungeons.java @@ -10,6 +10,7 @@ public class Dungeons { )
@ConfigEditorAccordion(id = 0)
public boolean dungeonMapAccordion = false;
+
@Expose
@ConfigOption(
name = "\u00A7cWarning",
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/LocationEdit.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/LocationEdit.java index 1fe90985..dd5fcd64 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/LocationEdit.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/LocationEdit.java @@ -156,5 +156,4 @@ public class LocationEdit { buttonText = "Edit" ) public Position combatPosition = new Position(10, 200); - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java index 10cfb9dd..2b0c42f7 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java @@ -242,34 +242,34 @@ public class Mining { @ConfigEditorDraggableList(
exampleText = {
"\u00a73Amber Crystal: \u00a7aPlaced\n" +
- "\u00a73Sapphire Crystal: \u00a7eCollected\n" +
- "\u00a73Jade Crystal: \u00a7eMissing\n" +
- "\u00a73Amethyst Crystal: \u00a7cMissing\n" +
- "\u00a73Topaz Crystal: \u00a7cMissing\n",
+ "\u00a73Sapphire Crystal: \u00a7eCollected\n" +
+ "\u00a73Jade Crystal: \u00a7eMissing\n" +
+ "\u00a73Amethyst Crystal: \u00a7cMissing\n" +
+ "\u00a73Topaz Crystal: \u00a7cMissing\n",
"\u00a73Crystals: \u00a7a4/5",
"\u00a73Crystals: \u00a7a80%",
"\u00a73Electron Transmitter: \u00a7aDone\n" +
- "\u00a73Robotron Reflector: \u00a7eIn Storage\n" +
- "\u00a73Superlite Motor: \u00a7eIn Inventory\n" +
- "\u00a73Synthetic Hearth: \u00a7cMissing\n" +
- "\u00a73Control Switch: \u00a7cMissing\n" +
- "\u00a73FTX 3070: \u00a7cMissing",
+ "\u00a73Robotron Reflector: \u00a7eIn Storage\n" +
+ "\u00a73Superlite Motor: \u00a7eIn Inventory\n" +
+ "\u00a73Synthetic Hearth: \u00a7cMissing\n" +
+ "\u00a73Control Switch: \u00a7cMissing\n" +
+ "\u00a73FTX 3070: \u00a7cMissing",
"\u00a73Electron Transmitter: \u00a7a3\n" +
- "\u00a73Robotron Reflector: \u00a7e2\n" +
- "\u00a73Superlite Motor: \u00a7e1\n" +
- "\u00a73Synthetic Hearth: \u00a7c0\n" +
- "\u00a73Control Switch: \u00a7c0\n" +
- "\u00a73FTX 3070: \u00a7c0",
+ "\u00a73Robotron Reflector: \u00a7e2\n" +
+ "\u00a73Superlite Motor: \u00a7e1\n" +
+ "\u00a73Synthetic Hearth: \u00a7c0\n" +
+ "\u00a73Control Switch: \u00a7c0\n" +
+ "\u00a73FTX 3070: \u00a7c0",
"\u00a73Automaton parts: \u00a7a5/6",
"\u00a73Automaton parts: \u00a7a83%",
"\u00a73Scavenged Lapis Sword: \u00a7aDone\n" +
- "\u00a73Scavenged Golden Hammer: \u00a7eIn Storage\n" +
- "\u00a73Scavenged Diamond Axe: \u00a7eIn Inventory\n" +
- "\u00a73Scavenged Emerald Hammer: \u00a7cMissing\n",
+ "\u00a73Scavenged Golden Hammer: \u00a7eIn Storage\n" +
+ "\u00a73Scavenged Diamond Axe: \u00a7eIn Inventory\n" +
+ "\u00a73Scavenged Emerald Hammer: \u00a7cMissing\n",
"\u00a73Scavenged Lapis Sword: \u00a7a3\n" +
- "\u00a73Scavenged Golden Hammer: \u00a7e2\n" +
- "\u00a73Scavenged Diamond Axe: \u00a7e1\n" +
- "\u00a73Scavenged Emerald Hammer: \u00a7c0\n",
+ "\u00a73Scavenged Golden Hammer: \u00a7e2\n" +
+ "\u00a73Scavenged Diamond Axe: \u00a7e1\n" +
+ "\u00a73Scavenged Emerald Hammer: \u00a7c0\n",
"\u00a73Mines of Divan parts: \u00a7a3/4",
"\u00a73Mines of Divan parts: \u00a7a75%"
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Notifications.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Notifications.java index 107931db..bc3e95c6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Notifications.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Notifications.java @@ -22,11 +22,11 @@ public class Notifications { @ConfigEditorBoolean
public boolean doRamNotif = true;
- /*@Expose
- @ConfigOption(
- name = "Wrong Pet",
- desc = "Gives a notification in chat whenever you're using a pet that doesnt match the same xp you're gathering."
- )
- @ConfigEditorBoolean
- public boolean showWrongPetMsg = false;*/
+ /*@Expose
+ @ConfigOption(
+ name = "Wrong Pet",
+ desc = "Gives a notification in chat whenever you're using a pet that doesnt match the same xp you're gathering."
+ )
+ @ConfigEditorBoolean
+ public boolean showWrongPetMsg = false;*/
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SlayerOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SlayerOverlay.java index 8ea34c52..de05c0f2 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SlayerOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SlayerOverlay.java @@ -9,7 +9,6 @@ import java.util.Arrays; import java.util.List; public class SlayerOverlay { - @Expose @ConfigOption( name = "\u00A7cWarning", diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java index 5e8625b0..463362a7 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java @@ -30,7 +30,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicInteger; public class AuctionSearchOverlay { - private static final ResourceLocation SEARCH_OVERLAY_TEXTURE = new ResourceLocation("notenoughupdates:auc_search/ah_search_overlay.png"); private static final ResourceLocation SEARCH_OVERLAY_TEXTURE_TAB_COMPLETED = new ResourceLocation("notenoughupdates:auc_search/ah_search_overlay_tab_completed.png"); private static final ResourceLocation STAR = new ResourceLocation("notenoughupdates:auc_search/star.png"); @@ -569,7 +568,5 @@ public class AuctionSearchOverlay { } } } - } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CombatSkillOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CombatSkillOverlay.java index 36d3e17a..e2994b06 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CombatSkillOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CombatSkillOverlay.java @@ -18,7 +18,6 @@ import java.util.List; import java.util.function.Supplier; public class CombatSkillOverlay extends TextOverlay { //Im sure there is a much better way to do this besides making another class ¯\_(ツ)_/¯ - private long lastUpdate = -1; private int killLast = -1; private int kill = -1; @@ -241,6 +240,4 @@ public class CombatSkillOverlay extends TextOverlay { //Im sure there is a much if(overlayStrings != null && overlayStrings.isEmpty()) overlayStrings = null; } } - - }
\ No newline at end of file diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CrystalHollowOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CrystalHollowOverlay.java index e59702ee..79d66f45 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CrystalHollowOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CrystalHollowOverlay.java @@ -351,22 +351,23 @@ public class CrystalHollowOverlay extends TextOverlay { private static Map<String, ItemStack> crystallHollowsIcons; private static void setupCrystallHollowsIcons() { - crystallHollowsIcons = new HashMap<String, ItemStack>(){}; - crystallHollowsIcons.put("Scavenged Lapis Sword", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("DWARVEN_LAPIS_SWORD"))); - crystallHollowsIcons.put("Scavenged Golden Hammer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("DWARVEN_GOLD_HAMMER"))); - crystallHollowsIcons.put("Scavenged Diamond Axe", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("DWARVEN_DIAMOND_AXE"))); - crystallHollowsIcons.put("Scavenged Emerald Hammer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("DWARVEN_EMERALD_HAMMER"))); - crystallHollowsIcons.put("Electron Transmitter", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("ELECTRON_TRANSMITTER"))); - crystallHollowsIcons.put("FTX 3070", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("FTX_3070"))); - crystallHollowsIcons.put("Robotron Reflector", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("ROBOTRON_REFLECTOR"))); - crystallHollowsIcons.put("Superlite Motor", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("SUPERLITE_MOTOR"))); - crystallHollowsIcons.put("Control Switch", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("CONTROL_SWITCH"))); - crystallHollowsIcons.put("Synthetic Heart", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("SYNTHETIC_HEART"))); - crystallHollowsIcons.put("Amber", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("PERFECT_AMBER_GEM"))); - crystallHollowsIcons.put("Sapphire", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("PERFECT_SAPPHIRE_GEM"))); - crystallHollowsIcons.put("Jade", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("PERFECT_JADE_GEM"))); - crystallHollowsIcons.put("Amethyst", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("PERFECT_AMETHYST_GEM"))); - crystallHollowsIcons.put("Topaz", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("PERFECT_TOPAZ_GEM"))); + crystallHollowsIcons = new HashMap<String, ItemStack>() {{ + put("Scavenged Lapis Sword", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("DWARVEN_LAPIS_SWORD"))); + put("Scavenged Golden Hammer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("DWARVEN_GOLD_HAMMER"))); + put("Scavenged Diamond Axe", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("DWARVEN_DIAMOND_AXE"))); + put("Scavenged Emerald Hammer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("DWARVEN_EMERALD_HAMMER"))); + put("Electron Transmitter", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("ELECTRON_TRANSMITTER"))); + put("FTX 3070", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("FTX_3070"))); + put("Robotron Reflector", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("ROBOTRON_REFLECTOR"))); + put("Superlite Motor", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("SUPERLITE_MOTOR"))); + put("Control Switch", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("CONTROL_SWITCH"))); + put("Synthetic Heart", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("SYNTHETIC_HEART"))); + put("Amber", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("PERFECT_AMBER_GEM"))); + put("Sapphire", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("PERFECT_SAPPHIRE_GEM"))); + put("Jade", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("PERFECT_JADE_GEM"))); + put("Amethyst", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("PERFECT_AMETHYST_GEM"))); + put("Topaz", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("PERFECT_TOPAZ_GEM"))); + }}; } @Override diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingOverlay.java index a163b000..e6643ccb 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/FarmingOverlay.java @@ -19,7 +19,6 @@ import java.util.List; import java.util.function.Supplier; public class FarmingOverlay extends TextOverlay { - private long lastUpdate = -1; private int counterLast = -1; private int counter = -1; @@ -479,5 +478,4 @@ public class FarmingOverlay extends TextOverlay { if (overlayStrings != null && overlayStrings.isEmpty()) overlayStrings = null; } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/FishingSkillOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/FishingSkillOverlay.java index b7643417..86cbe38d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/FishingSkillOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/FishingSkillOverlay.java @@ -372,6 +372,4 @@ public class FishingSkillOverlay extends TextOverlay { //Im sure there is a much if(overlayStrings != null && overlayStrings.isEmpty()) overlayStrings = null; } } - - }
\ No newline at end of file diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/FuelBar.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/FuelBar.java index 897fbc5e..2d7118db 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/FuelBar.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/FuelBar.java @@ -19,7 +19,6 @@ import org.lwjgl.opengl.GL14; import java.awt.*; public class FuelBar { - public static final ResourceLocation FUEL_BAR = new ResourceLocation("notenoughupdates:fuel_bar.png"); private float fuelAmount = -1; @@ -165,5 +164,4 @@ public class FuelBar { GlStateManager.popMatrix(); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java index acace238..9c083d76 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java @@ -34,7 +34,6 @@ import java.util.regex.Pattern; import static net.minecraft.util.EnumChatFormatting.*; public class MiningOverlay extends TextOverlay { - public MiningOverlay(Position position, Supplier<List<String>> dummyStrings, Supplier<TextOverlayStyle> styleSupplier) { super(position, dummyStrings, styleSupplier); } @@ -681,30 +680,30 @@ public class MiningOverlay extends TextOverlay { private static HashMap<String, ItemStack> miningOverlayCommisionItems; private static void setupMiningOverlayCommisionItems(){ - miningOverlayCommisionItems = new HashMap<String, ItemStack>() {}; - miningOverlayCommisionItems.put("Mithril Powder", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("INK_SACK-10"))); - miningOverlayCommisionItems.put("Gemstone Powder", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("INK_SACK-9"))); - miningOverlayCommisionItems.put("Lucky Raffle", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("MINING_RAFFLE_TICKET"))); - miningOverlayCommisionItems.put("Raffle", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("MINING_RAFFLE_TICKET"))); - miningOverlayCommisionItems.put("Pickaxe CD", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("DIAMOND_PICKAXE"))); - miningOverlayCommisionItems.put("Thyst Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("THYST_MONSTER"))); - miningOverlayCommisionItems.put("Hard Stone Miner", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("HARD_STONE"))); - miningOverlayCommisionItems.put("Ice Walker Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("ENCHANTED_ICE"))); - miningOverlayCommisionItems.put("Goblin Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("GOBLIN_MONSTER"))); - miningOverlayCommisionItems.put("Star Sentry Puncher", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("NETHER_STAR"))); - miningOverlayCommisionItems.put("Goblin Raid", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("ENCHANTED_GOLD"))); - miningOverlayCommisionItems.put("Goblin Raid Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("ENCHANTED_GOLD"))); - miningOverlayCommisionItems.put("Golden Goblin Slayer", new ItemStack(Items.golden_helmet, 1, 0)); - miningOverlayCommisionItems.put("2x Mithril Powder Collector", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("ENCHANTED_GLOWSTONE_DUST"))); - miningOverlayCommisionItems.put("Automaton Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("AUTOMATON_MONSTER"))); - miningOverlayCommisionItems.put("Sludge Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("SLUDGE_MONSTER"))); - miningOverlayCommisionItems.put("Team Treasurite Member Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("EXECUTIVE_WENDY_MONSTER"))); - miningOverlayCommisionItems.put("Yog Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("YOG_MONSTER"))); - miningOverlayCommisionItems.put("Boss Corleone Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("BOSS_CORLEONE_BOSS"))); - miningOverlayCommisionItems.put("Chest Looter", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("CHEST"))); - miningOverlayCommisionItems.put("Titanium", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("TITANIUM_ORE"))); - miningOverlayCommisionItems.put("Mithril", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("MITHRIL_ORE"))); - miningOverlayCommisionItems.put("Forge", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("ANVIL"))); + miningOverlayCommisionItems = new HashMap<String, ItemStack>() {{ + put("Mithril Powder", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("INK_SACK-10"))); + put("Gemstone Powder", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("INK_SACK-9"))); + put("Lucky Raffle", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("MINING_RAFFLE_TICKET"))); + put("Raffle", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("MINING_RAFFLE_TICKET"))); + put("Pickaxe CD", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("DIAMOND_PICKAXE"))); + put("Thyst Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("THYST_MONSTER"))); + put("Hard Stone Miner", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("HARD_STONE"))); + put("Ice Walker Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("ENCHANTED_ICE"))); + put("Goblin Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("GOBLIN_MONSTER"))); + put("Star Sentry Puncher", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("NETHER_STAR"))); + put("Goblin Raid", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("ENCHANTED_GOLD"))); + put("Goblin Raid Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("ENCHANTED_GOLD"))); + put("Golden Goblin Slayer", new ItemStack(Items.golden_helmet, 1, 0)); + put("2x Mithril Powder Collector", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("ENCHANTED_GLOWSTONE_DUST"))); + put("Automaton Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("AUTOMATON_MONSTER"))); + put("Sludge Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("SLUDGE_MONSTER"))); + put("Team Treasurite Member Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("EXECUTIVE_WENDY_MONSTER"))); + put("Yog Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("YOG_MONSTER"))); + put("Boss Corleone Slayer", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("BOSS_CORLEONE_BOSS"))); + put("Chest Looter", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("CHEST"))); + put("Titanium", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("TITANIUM_ORE"))); + put("Mithril", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("MITHRIL_ORE"))); + put("Forge", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("ANVIL"))); + }}; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningSkillOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningSkillOverlay.java index d143aa6c..a403ba73 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningSkillOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningSkillOverlay.java @@ -18,7 +18,6 @@ import java.util.List; import java.util.function.Supplier; public class MiningSkillOverlay extends TextOverlay { //Im sure there is a much better way to do this besides making another class ¯\_(ツ)_/¯ - private long lastUpdate = -1; private int compactLast = -1; private int compact = -1; @@ -339,6 +338,4 @@ public class MiningSkillOverlay extends TextOverlay { //Im sure there is a much if(overlayStrings != null && overlayStrings.isEmpty()) overlayStrings = null; } } - - }
\ No newline at end of file diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/OverlayManager.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/OverlayManager.java index dd9abc31..2788b54c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/OverlayManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/OverlayManager.java @@ -8,7 +8,6 @@ import java.util.ArrayList; import java.util.List; public class OverlayManager { - public static Class<? extends TextOverlay> dontRenderOverlay = null; public static MiningOverlay miningOverlay; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/RancherBootOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/RancherBootOverlay.java index 5cd4df00..5853927f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/RancherBootOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/RancherBootOverlay.java @@ -16,7 +16,6 @@ import org.lwjgl.input.Mouse; import java.util.HashMap; public class RancherBootOverlay { - private static int selectedIndex = 0; private static final HashMap<Integer, Integer> currentSpeeds = new HashMap<>(); @@ -153,5 +152,4 @@ public class RancherBootOverlay { } } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/SlayerOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/SlayerOverlay.java index 6f5be7e9..a7bb0b66 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/SlayerOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/SlayerOverlay.java @@ -14,7 +14,6 @@ import java.util.List; import java.util.function.Supplier; public class SlayerOverlay extends TextOverlay { - public static boolean slayerQuest; public static String RNGMeter = "?"; public static boolean isSlain = false; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlay.java index 6756d6c0..ace0a6e9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlay.java @@ -15,7 +15,6 @@ import java.util.List; import java.util.function.Supplier; public abstract class TextOverlay { - private final Position position; protected Supplier<TextOverlayStyle> styleSupplier; public int overlayWidth = -1; @@ -172,5 +171,4 @@ public abstract class TextOverlay { } } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlayStyle.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlayStyle.java index b9b314d4..ea4356be 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlayStyle.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlayStyle.java @@ -1,10 +1,8 @@ package io.github.moulberry.notenoughupdates.overlays; public enum TextOverlayStyle { - BACKGROUND, NO_SHADOW, MC_SHADOW, FULL_SHADOW - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java index 67873df8..44108682 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java @@ -31,7 +31,6 @@ import java.util.regex.Pattern; import static net.minecraft.util.EnumChatFormatting.DARK_AQUA; public class TimersOverlay extends TextOverlay { - private static final Pattern PATTERN_ACTIVE_EFFECTS = Pattern.compile("\u00a7r\u00a7r\u00a77You have a \u00a7r\u00a7cGod Potion \u00a7r\u00a77active! \u00a7r\u00a7d([0-9]*?:?[0-9]*?:?[0-9]*)\u00a7r"); public TimersOverlay(Position position, Supplier<List<String>> dummyStrings, Supplier<TextOverlayStyle> styleSupplier) { @@ -479,8 +478,6 @@ public class TimersOverlay extends TextOverlay { SOON, KINDASOON, ALWAYS, - } - } 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 1ae62b6c..c3c68b9b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java @@ -60,7 +60,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class GuiProfileViewer extends GuiScreen { - private static final ResourceLocation CHEST_GUI_TEXTURE = new ResourceLocation("textures/gui/container/generic_54.png"); public static final ResourceLocation pv_basic = new ResourceLocation("notenoughupdates:pv_basic.png"); public static final ResourceLocation pv_dung = new ResourceLocation("notenoughupdates:pv_dung.png"); @@ -879,13 +878,10 @@ public class GuiProfileViewer extends GuiScreen { } } - private static final LinkedHashMap<String, ItemStack> dungeonsModeIcons = new LinkedHashMap<>(); - - static { - dungeonsModeIcons.put("catacombs", Utils.editItemStackInfo(NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("DUNGEON_STONE")), EnumChatFormatting.GRAY + "Normal Mode", true)); - dungeonsModeIcons.put("master_catacombs", Utils.editItemStackInfo(NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("MASTER_SKULL_TIER_7")), EnumChatFormatting.GRAY + "Master Mode", true)); - - } + private static final LinkedHashMap<String, ItemStack> dungeonsModeIcons = new LinkedHashMap<String, ItemStack>() {{ + put("catacombs", Utils.editItemStackInfo(NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("DUNGEON_STONE")), EnumChatFormatting.GRAY + "Normal Mode", true)); + put("master_catacombs", Utils.editItemStackInfo(NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("MASTER_SKULL_TIER_7")), EnumChatFormatting.GRAY + "Master Mode", true)); + }}; private void drawDungPage(int mouseX, int mouseY, float partialTicks) { Minecraft.getMinecraft().getTextureManager().bindTexture(pv_dung); @@ -1290,7 +1286,6 @@ public class GuiProfileViewer extends GuiScreen { //drawSideButton(1, dungeonsModeIcons.get("master_catacombs"), true); //drawSideButton(1, dungeonsModeIcons.get("catacombs"), true); //drawSideButton(2, dungeonsModeIcons.get("catacombs"), false); - } private boolean onMasterMode = false; @@ -1357,7 +1352,6 @@ public class GuiProfileViewer extends GuiScreen { GlStateManager.enableDepth(); Utils.drawItemStack(itemStack, x + 8, y + 7); - } private void renderXpBar(String skillName, ItemStack stack, int x, int y, int xSize, ProfileViewer.Level levelObj, int mouseX, int mouseY) { @@ -1497,53 +1491,30 @@ public class GuiProfileViewer extends GuiScreen { return levelObj; } - public static final HashMap<String, HashMap<String, Float>> PET_STAT_BOOSTS = new HashMap<>(); - - static { - HashMap<String, Float> bigTeeth = new HashMap<>(); - bigTeeth.put("CRIT_CHANCE", 5f); - PET_STAT_BOOSTS.put("PET_ITEM_BIG_TEETH_COMMON", bigTeeth); - - HashMap<String, Float> hardenedScales = new HashMap<>(); - hardenedScales.put("DEFENCE", 25f); - PET_STAT_BOOSTS.put("PET_ITEM_HARDENED_SCALES_UNCOMMON", hardenedScales); - - HashMap<String, Float> luckyClover = new HashMap<>(); - luckyClover.put("MAGIC_FIND", 7f); - PET_STAT_BOOSTS.put("PET_ITEM_LUCKY_CLOVER", luckyClover); - - HashMap<String, Float> sharpenedClaws = new HashMap<>(); - sharpenedClaws.put("CRIT_DAMAGE", 15f); - PET_STAT_BOOSTS.put("PET_ITEM_SHARPENED_CLAWS_UNCOMMON", sharpenedClaws); - } - - public static final HashMap<String, HashMap<String, Float>> PET_STAT_BOOSTS_MULT = new HashMap<>(); - - static { - HashMap<String, Float> ironClaws = new HashMap<>(); - ironClaws.put("CRIT_DAMAGE", 1.4f); - ironClaws.put("CRIT_CHANCE", 1.4f); - PET_STAT_BOOSTS_MULT.put("PET_ITEM_IRON_CLAWS_COMMON", ironClaws); - - HashMap<String, Float> textbook = new HashMap<>(); - textbook.put("INTELLIGENCE", 2f); - PET_STAT_BOOSTS_MULT.put("PET_ITEM_TEXTBOOK", textbook); - } - + public static final HashMap<String, HashMap<String, Float>> PET_STAT_BOOSTS = new HashMap<String, HashMap<String, Float>>() {{ + put("PET_ITEM_BIG_TEETH_COMMON", new HashMap<String, Float>() {{ put("CRIT_CHANCE", 5f); }}); + put("PET_ITEM_HARDENED_SCALES_UNCOMMON", new HashMap<String, Float>() {{ put("DEFENCE", 25f); }}); + put("PET_ITEM_LUCKY_CLOVER", new HashMap<String, Float>() {{ put("MAGIC_FIND", 7f); }}); + put("PET_ITEM_SHARPENED_CLAWS_UNCOMMON", new HashMap<String, Float>() {{ put("CRIT_DAMAGE", 15f); }}); + }}; + + public static final HashMap<String, HashMap<String, Float>> PET_STAT_BOOSTS_MULT = new HashMap<String, HashMap<String, Float>>() {{ + put("PET_ITEM_IRON_CLAWS_COMMON", new HashMap<String, Float>() {{ put("CRIT_DAMAGE", 1.4f); put("CRIT_CHANCE", 1.4f); }}); + put("PET_ITEM_TEXTBOOK", new HashMap<String, Float>() {{ put("INTELLIGENCE", 2f); }}); + }}; + private int selectedPet = -1; private int petsPage = 0; private List<JsonObject> sortedPets = null; private List<ItemStack> sortedPetsStack = null; - public static HashMap<String, String> MINION_RARITY_TO_NUM = new HashMap<>(); - - static { - MINION_RARITY_TO_NUM.put("COMMON", "0"); - MINION_RARITY_TO_NUM.put("UNCOMMON", "1"); - MINION_RARITY_TO_NUM.put("RARE", "2"); - MINION_RARITY_TO_NUM.put("EPIC", "3"); - MINION_RARITY_TO_NUM.put("LEGENDARY", "4"); - MINION_RARITY_TO_NUM.put("MYTHIC", "5"); - } + public static HashMap<String, String> MINION_RARITY_TO_NUM = new HashMap<String, String>() {{ + put("COMMON", "0"); + put("UNCOMMON", "1"); + put("RARE", "2"); + put("EPIC", "3"); + put("LEGENDARY", "4"); + put("MYTHIC", "5"); + }}; private void drawPetsPage(int mouseX, int mouseY, float partialTicks) { JsonObject petsInfo = profile.getPetsInfo(profileId); @@ -1641,8 +1612,7 @@ public class GuiProfileViewer extends GuiScreen { try { float value = Float.parseFloat(replacements.get(entryBoost.getKey())); replacements.put(entryBoost.getKey(), String.valueOf((int) Math.floor(value * entryBoost.getValue()))); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } } } @@ -2056,19 +2026,17 @@ public class GuiProfileViewer extends GuiScreen { //190 } - private static final LinkedHashMap<String, ItemStack> invNameToDisplayMap = new LinkedHashMap<>(); - - static { - invNameToDisplayMap.put("inv_contents", Utils.createItemStack(Item.getItemFromBlock(Blocks.chest), EnumChatFormatting.GRAY + "Inventory")); - invNameToDisplayMap.put("ender_chest_contents", Utils.createItemStack(Item.getItemFromBlock(Blocks.ender_chest), EnumChatFormatting.GRAY + "Ender Chest")); - //invNameToDisplayMap.put("backpack_contents", Utils.createItemStack(Item.getItemFromBlock(Blocks.dropper), EnumChatFormatting.GRAY+"Backpacks")); - invNameToDisplayMap.put("backpack_contents", Utils.editItemStackInfo(NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("JUMBO_BACKPACK")), EnumChatFormatting.GRAY + "Backpacks", true)); - invNameToDisplayMap.put("personal_vault_contents", Utils.editItemStackInfo(NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("IRON_CHEST")), EnumChatFormatting.GRAY + "Personal vault", true)); - invNameToDisplayMap.put("talisman_bag", Utils.createItemStack(Items.golden_apple, EnumChatFormatting.GRAY + "Accessory Bag")); - invNameToDisplayMap.put("wardrobe_contents", Utils.createItemStack(Items.leather_chestplate, EnumChatFormatting.GRAY + "Wardrobe")); - invNameToDisplayMap.put("fishing_bag", Utils.createItemStack(Items.fish, EnumChatFormatting.GRAY + "Fishing Bag")); - invNameToDisplayMap.put("potion_bag", Utils.createItemStack(Items.potionitem, EnumChatFormatting.GRAY + "Potion Bag")); - } + private static final LinkedHashMap<String, ItemStack> invNameToDisplayMap = new LinkedHashMap<String, ItemStack>() {{ + put("inv_contents", Utils.createItemStack(Item.getItemFromBlock(Blocks.chest), EnumChatFormatting.GRAY + "Inventory")); + put("ender_chest_contents", Utils.createItemStack(Item.getItemFromBlock(Blocks.ender_chest), EnumChatFormatting.GRAY + "Ender Chest")); + // put("backpack_contents", Utils.createItemStack(Item.getItemFromBlock(Blocks.dropper), EnumChatFormatting.GRAY+"Backpacks")); + put("backpack_contents", Utils.editItemStackInfo(NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("JUMBO_BACKPACK")), EnumChatFormatting.GRAY + "Backpacks", true)); + put("personal_vault_contents", Utils.editItemStackInfo(NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("IRON_CHEST")), EnumChatFormatting.GRAY + "Personal vault", true)); + put("talisman_bag", Utils.createItemStack(Items.golden_apple, EnumChatFormatting.GRAY + "Accessory Bag")); + put("wardrobe_contents", Utils.createItemStack(Items.leather_chestplate, EnumChatFormatting.GRAY + "Wardrobe")); + put("fishing_bag", Utils.createItemStack(Items.fish, EnumChatFormatting.GRAY + "Fishing Bag")); + put("potion_bag", Utils.createItemStack(Items.potionitem, EnumChatFormatting.GRAY + "Potion Bag")); + }}; public int countItemsInInventory(String internalname, JsonObject inventoryInfo, boolean specific, String... invsToSearch) { int count = 0; @@ -2165,39 +2133,6 @@ public class GuiProfileViewer extends GuiScreen { return 0; } - //unused function - //Data has been removed from the repo - @Deprecated - private int getAvailableSlotsForInventory(JsonObject inventoryInfo, JsonObject collectionInfo, String invName) { - if (collectionInfo == null) return -1; - JsonObject misc = Constants.MISC; - if (misc == null) return -1; - JsonElement sizesElement = Utils.getElement(misc, "bag_size." + invName + ".sizes"); - JsonElement collectionElement = Utils.getElement(misc, "bag_size." + invName + ".collection"); - - if (sizesElement == null || !sizesElement.isJsonArray()) return -1; - if (collectionElement == null || !collectionElement.isJsonPrimitive()) return -1; - - JsonArray sizes = sizesElement.getAsJsonArray(); - String collection = collectionElement.getAsString(); - - JsonElement tierElement = Utils.getElement(collectionInfo, "collection_tiers." + collection); - - if (tierElement == null || !tierElement.isJsonPrimitive()) { - return 0; - } - int tier = tierElement.getAsInt(); - - int currentSlots = 0; - for (int i = 0; i < sizes.size(); i++) { - JsonObject sizeInfo = sizes.get(i).getAsJsonObject(); - if (sizeInfo.get("tier").getAsInt() <= tier) { - currentSlots = sizeInfo.get("slots").getAsInt(); - } - } - return currentSlots; - } - private final ItemStack fillerStack = new ItemStack(Item.getItemFromBlock(Blocks.stained_glass_pane), 1, 15); public ItemStack[][][] getItemsForInventory(JsonObject inventoryInfo, String invName) { @@ -2920,9 +2855,9 @@ public class GuiProfileViewer extends GuiScreen { if (effMinerStat2 < 1) { effMinerStat2 = 1; } - int moul = ((Utils.getElementAsInt(Utils.getElement(profileInfo, "mining_core.nodes.mole"), 0))); - float moulStat = (float) ((Utils.getElementAsFloat(Utils.getElement(profileInfo, "mining_core.nodes.mole"), 0)) * 0.051); - double moleperkstat = (double) moul / 20 - 0.55 + 50; + int mole = ((Utils.getElementAsInt(Utils.getElement(profileInfo, "mining_core.nodes.mole"), 0))); + float moleStat = (float) ((Utils.getElementAsFloat(Utils.getElement(profileInfo, "mining_core.nodes.mole"), 0)) * 0.051); + double moleperkstat = (double) mole / 20 - 0.55 + 50; double moleperkstat2 = (double) Math.round(moleperkstat * 100) / 100; float output = Math.round((float) (moleperkstat2 % 1) * 100); @@ -3398,26 +3333,24 @@ public class GuiProfileViewer extends GuiScreen { } } } - //aaaaa - //aaa - boolean moulunlocked = (moul > 0); - List<String> moulTooltip = null; + boolean moleunlocked = (mole > 0); + List<String> moleTooltip = null; GlStateManager.color(1, 1, 1, 1); GlStateManager.disableLighting(); - Minecraft.getMinecraft().getRenderItem().renderItemIntoGUI(new ItemStack((moulunlocked ? Items.emerald : Items.coal)), (int) (guiLeft + xStart + 255), (int) (guiTop + yStartTop + 18)); + Minecraft.getMinecraft().getRenderItem().renderItemIntoGUI(new ItemStack((moleunlocked ? Items.emerald : Items.coal)), (int) (guiLeft + xStart + 255), (int) (guiTop + yStartTop + 18)); GlStateManager.enableLighting(); if (mouseX >= guiLeft + xStart + 255 && mouseX < guiLeft + xStart + 271) { if (mouseY >= guiTop + yStartTop + 18 && mouseY <= guiTop + yStartTop + 34) { - moulTooltip = Lists.newArrayList( - (moulunlocked ? EnumChatFormatting.GREEN : EnumChatFormatting.RED) + "Mole", - EnumChatFormatting.GRAY + "Level " + moul + EnumChatFormatting.DARK_GRAY + "/190", + moleTooltip = Lists.newArrayList( + (moleunlocked ? EnumChatFormatting.GREEN : EnumChatFormatting.RED) + "Mole", + EnumChatFormatting.GRAY + "Level " + mole + EnumChatFormatting.DARK_GRAY + "/190", "", EnumChatFormatting.GRAY + "When mining hard stone, you have", EnumChatFormatting.GRAY + "a " + EnumChatFormatting.GREEN + output + "% " + EnumChatFormatting.GRAY + "chance to mine " + EnumChatFormatting.GREEN + "", - EnumChatFormatting.GREEN + "" + Math.round(moulStat) + EnumChatFormatting.GRAY + " adjacent hard stone blocks." + EnumChatFormatting.GREEN + "" + Math.round(moleStat) + EnumChatFormatting.GRAY + " adjacent hard stone blocks." ); - Utils.drawHoveringText(moulTooltip, mouseX, mouseY, width, height, -1, fr); - moulTooltip = null; + Utils.drawHoveringText(moleTooltip, mouseX, mouseY, width, height, -1, fr); + moleTooltip = null; } } boolean powderBuffunlocked = (powderBuff > 0); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/Panorama.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/Panorama.java index 85cadec7..37781daf 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/Panorama.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/Panorama.java @@ -16,7 +16,6 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.util.glu.Project; public class Panorama { - private static final TexLoc tl = new TexLoc(97, 19, Keyboard.KEY_P); private static final TexLoc tl2 = new TexLoc(37, 80, Keyboard.KEY_L); @@ -158,5 +157,4 @@ public class Panorama { .tex(1, 1).endVertex(); tessellator.draw(); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/PlayerStats.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/PlayerStats.java index 294d0322..a2ecec09 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/PlayerStats.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/PlayerStats.java @@ -332,32 +332,19 @@ public class PlayerStats { return bonuses; } - private static final Pattern HEALTH_PATTERN = Pattern.compile("^Health: ((?:\\+|-)[0-9]+)"); - private static final Pattern DEFENCE_PATTERN = Pattern.compile("^Defense: ((?:\\+|-)[0-9]+)"); - private static final Pattern STRENGTH_PATTERN = Pattern.compile("^Strength: ((?:\\+|-)[0-9]+)"); - private static final Pattern SPEED_PATTERN = Pattern.compile("^Speed: ((?:\\+|-)[0-9]+)"); - private static final Pattern CC_PATTERN = Pattern.compile("^Crit Chance: ((?:\\+|-)[0-9]+)"); - private static final Pattern CD_PATTERN = Pattern.compile("^Crit Damage: ((?:\\+|-)[0-9]+)"); - private static final Pattern ATKSPEED_PATTERN = Pattern.compile("^Bonus Attack Speed: ((?:\\+|-)[0-9]+)"); - private static final Pattern INTELLIGENCE_PATTERN = Pattern.compile("^Intelligence: ((?:\\+|-)[0-9]+)"); - private static final Pattern SCC_PATTERN = Pattern.compile("^Sea Creature Chance: ((?:\\+|-)[0-9]+)"); - private static final Pattern FEROCITY_PATTERN = Pattern.compile("^Ferocity: ((?:\\+|-)[0-9]+)"); - private static final Pattern AD_PATTERN = Pattern.compile("^Ability Damage: ((?:\\+|-)[0-9]+)"); - private static final HashMap<String, Pattern> STAT_PATTERN_MAP = new HashMap<>(); - - static { - STAT_PATTERN_MAP.put("health", HEALTH_PATTERN); - STAT_PATTERN_MAP.put("defence", DEFENCE_PATTERN); - STAT_PATTERN_MAP.put("strength", STRENGTH_PATTERN); - STAT_PATTERN_MAP.put("speed", SPEED_PATTERN); - STAT_PATTERN_MAP.put("crit_chance", CC_PATTERN); - STAT_PATTERN_MAP.put("crit_damage", CD_PATTERN); - STAT_PATTERN_MAP.put("bonus_attack_speed", ATKSPEED_PATTERN); - STAT_PATTERN_MAP.put("intelligence", INTELLIGENCE_PATTERN); - STAT_PATTERN_MAP.put("sea_creature_chance", SCC_PATTERN); - STAT_PATTERN_MAP.put("ferocity", FEROCITY_PATTERN); - STAT_PATTERN_MAP.put("ability_damage", AD_PATTERN); - } + private static final HashMap<String, Pattern> STAT_PATTERN_MAP = new HashMap<String, Pattern>() {{ + put(HEALTH, Pattern.compile("^Health: ((?:\\+|-)[0-9]+)")); + put(DEFENCE, Pattern.compile("^Defense: ((?:\\+|-)[0-9]+)")); + put(STRENGTH, Pattern.compile("^Strength: ((?:\\+|-)[0-9]+)")); + put(SPEED, Pattern.compile("^Speed: ((?:\\+|-)[0-9]+)")); + put(CRIT_CHANCE, Pattern.compile("^Crit Chance: ((?:\\+|-)[0-9]+)")); + put(CRIT_DAMAGE, Pattern.compile("^Crit Damage: ((?:\\+|-)[0-9]+)")); + put(BONUS_ATTACK_SPEED, Pattern.compile("^Bonus Attack Speed: ((?:\\+|-)[0-9]+)")); + put(INTELLIGENCE, Pattern.compile("^Intelligence: ((?:\\+|-)[0-9]+)")); + put(SEA_CREATURE_CHANCE, Pattern.compile("^Sea Creature Chance: ((?:\\+|-)[0-9]+)")); + put("ferocity", Pattern.compile("^Ferocity: ((?:\\+|-)[0-9]+)")); + put("ability_damage", Pattern.compile("^Ability Damage: ((?:\\+|-)[0-9]+)")); + }}; private static Stats getStatForItem(String internalname, JsonObject item, JsonArray lore) { Stats stats = new Stats(); @@ -627,5 +614,4 @@ public class PlayerStats { return stats; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java index de6dc467..f1b106d9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java @@ -27,43 +27,38 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class ProfileViewer { - private final NEUManager manager; public ProfileViewer(NEUManager manager) { this.manager = manager; } - private static final HashMap<String, String> petRarityToNumMap = new HashMap<>(); - - static { - petRarityToNumMap.put("COMMON", "0"); - petRarityToNumMap.put("UNCOMMON", "1"); - petRarityToNumMap.put("RARE", "2"); - petRarityToNumMap.put("EPIC", "3"); - petRarityToNumMap.put("LEGENDARY", "4"); - petRarityToNumMap.put("MYTHIC", "5"); - } - - private static final LinkedHashMap<String, ItemStack> skillToSkillDisplayMap = new LinkedHashMap<>(); - - static { - skillToSkillDisplayMap.put("skill_taming", Utils.createItemStack(Items.spawn_egg, EnumChatFormatting.LIGHT_PURPLE + "Taming")); - skillToSkillDisplayMap.put("skill_mining", Utils.createItemStack(Items.stone_pickaxe, EnumChatFormatting.GRAY + "Mining")); - skillToSkillDisplayMap.put("skill_foraging", Utils.createItemStack(Item.getItemFromBlock(Blocks.sapling), EnumChatFormatting.DARK_GREEN + "Foraging")); - skillToSkillDisplayMap.put("skill_enchanting", Utils.createItemStack(Item.getItemFromBlock(Blocks.enchanting_table), EnumChatFormatting.GREEN + "Enchanting")); - skillToSkillDisplayMap.put("skill_carpentry", Utils.createItemStack(Item.getItemFromBlock(Blocks.crafting_table), EnumChatFormatting.DARK_RED + "Carpentry")); - skillToSkillDisplayMap.put("skill_farming", Utils.createItemStack(Items.golden_hoe, EnumChatFormatting.YELLOW + "Farming")); - skillToSkillDisplayMap.put("skill_combat", Utils.createItemStack(Items.stone_sword, EnumChatFormatting.RED + "Combat")); - skillToSkillDisplayMap.put("skill_fishing", Utils.createItemStack(Items.fishing_rod, EnumChatFormatting.AQUA + "Fishing")); - skillToSkillDisplayMap.put("skill_alchemy", Utils.createItemStack(Items.brewing_stand, EnumChatFormatting.BLUE + "Alchemy")); - skillToSkillDisplayMap.put("skill_runecrafting", Utils.createItemStack(Items.magma_cream, EnumChatFormatting.DARK_PURPLE + "Runecrafting")); - //skillToSkillDisplayMap.put("skill_catacombs", Utils.createItemStack(Item.getItemFromBlock(Blocks.deadbush), EnumChatFormatting.GOLD+"Catacombs")); - skillToSkillDisplayMap.put("slayer_zombie", Utils.createItemStack(Items.rotten_flesh, EnumChatFormatting.GOLD + "Rev Slayer")); - skillToSkillDisplayMap.put("slayer_spider", Utils.createItemStack(Items.spider_eye, EnumChatFormatting.GOLD + "Tara Slayer")); - skillToSkillDisplayMap.put("slayer_wolf", Utils.createItemStack(Items.bone, EnumChatFormatting.GOLD + "Sven Slayer")); - skillToSkillDisplayMap.put("slayer_enderman", Utils.createItemStack(Items.ender_pearl, EnumChatFormatting.GOLD + "Ender Slayer")); - } + private static final HashMap<String, String> petRarityToNumMap = new HashMap<String, String>() {{ + put("COMMON", "0"); + put("UNCOMMON", "1"); + put("RARE", "2"); + put("EPIC", "3"); + put("LEGENDARY", "4"); + put("MYTHIC", "5"); + }}; + + private static final LinkedHashMap<String, ItemStack> skillToSkillDisplayMap = new LinkedHashMap<String, ItemStack>() {{ + put("skill_taming", Utils.createItemStack(Items.spawn_egg, EnumChatFormatting.LIGHT_PURPLE + "Taming")); + put("skill_mining", Utils.createItemStack(Items.stone_pickaxe, EnumChatFormatting.GRAY + "Mining")); + put("skill_foraging", Utils.createItemStack(Item.getItemFromBlock(Blocks.sapling), EnumChatFormatting.DARK_GREEN + "Foraging")); + put("skill_enchanting", Utils.createItemStack(Item.getItemFromBlock(Blocks.enchanting_table), EnumChatFormatting.GREEN + "Enchanting")); + put("skill_carpentry", Utils.createItemStack(Item.getItemFromBlock(Blocks.crafting_table), EnumChatFormatting.DARK_RED + "Carpentry")); + put("skill_farming", Utils.createItemStack(Items.golden_hoe, EnumChatFormatting.YELLOW + "Farming")); + put("skill_combat", Utils.createItemStack(Items.stone_sword, EnumChatFormatting.RED + "Combat")); + put("skill_fishing", Utils.createItemStack(Items.fishing_rod, EnumChatFormatting.AQUA + "Fishing")); + put("skill_alchemy", Utils.createItemStack(Items.brewing_stand, EnumChatFormatting.BLUE + "Alchemy")); + put("skill_runecrafting", Utils.createItemStack(Items.magma_cream, EnumChatFormatting.DARK_PURPLE + "Runecrafting")); + // put("skill_catacombs", Utils.createItemStack(Item.getItemFromBlock(Blocks.deadbush), EnumChatFormatting.GOLD+"Catacombs")); + put("slayer_zombie", Utils.createItemStack(Items.rotten_flesh, EnumChatFormatting.GOLD + "Rev Slayer")); + put("slayer_spider", Utils.createItemStack(Items.spider_eye, EnumChatFormatting.GOLD + "Tara Slayer")); + put("slayer_wolf", Utils.createItemStack(Items.bone, EnumChatFormatting.GOLD + "Sven Slayer")); + put("slayer_enderman", Utils.createItemStack(Items.ender_pearl, EnumChatFormatting.GOLD + "Ender Slayer")); + }}; private static final ItemStack CAT_FARMING = Utils.createItemStack(Items.golden_hoe, EnumChatFormatting.YELLOW + "Farming"); private static final ItemStack CAT_MINING = Utils.createItemStack(Items.stone_pickaxe, EnumChatFormatting.GRAY + "Mining"); @@ -71,189 +66,107 @@ public class ProfileViewer { private static final ItemStack CAT_FORAGING = Utils.createItemStack(Item.getItemFromBlock(Blocks.sapling), EnumChatFormatting.DARK_GREEN + "Foraging"); private static final ItemStack CAT_FISHING = Utils.createItemStack(Items.fishing_rod, EnumChatFormatting.AQUA + "Fishing"); - private static final LinkedHashMap<ItemStack, List<String>> collectionCatToCollectionMap = new LinkedHashMap<>(); - - static { - collectionCatToCollectionMap.put(CAT_FARMING, - Utils.createList("WHEAT", "CARROT_ITEM", "POTATO_ITEM", "PUMPKIN", "MELON", "SEEDS", "MUSHROOM_COLLECTION", - "INK_SACK:3", "CACTUS", "SUGAR_CANE", "FEATHER", "LEATHER", "PORK", "RAW_CHICKEN", "MUTTON", - "RABBIT", "NETHER_STALK")); - collectionCatToCollectionMap.put(CAT_MINING, - Utils.createList("COBBLESTONE", "COAL", "IRON_INGOT", "GOLD_INGOT", "DIAMOND", "INK_SACK:4", - "EMERALD", "REDSTONE", "QUARTZ", "OBSIDIAN", "GLOWSTONE_DUST", "GRAVEL", "ICE", "NETHERRACK", - "SAND", "ENDER_STONE", null, "MITHRIL_ORE", "HARD_STONE", "GEMSTONE_COLLECTION")); - collectionCatToCollectionMap.put(CAT_COMBAT, - Utils.createList("ROTTEN_FLESH", "BONE", "STRING", "SPIDER_EYE", "SULPHUR", "ENDER_PEARL", - "GHAST_TEAR", "SLIME_BALL", "BLAZE_ROD", "MAGMA_CREAM", null, null, null)); - collectionCatToCollectionMap.put(CAT_FORAGING, - Utils.createList("LOG", "LOG:1", "LOG:2", "LOG_2:1", "LOG_2", "LOG:3", null)); - collectionCatToCollectionMap.put(CAT_FISHING, - Utils.createList("RAW_FISH", "RAW_FISH:1", "RAW_FISH:2", "RAW_FISH:3", "PRISMARINE_SHARD", - "PRISMARINE_CRYSTALS", "CLAY_BALL", "WATER_LILY", "INK_SACK", "SPONGE")); - } - - private static final LinkedHashMap<ItemStack, List<String>> collectionCatToMinionMap = new LinkedHashMap<>(); - - static { - collectionCatToMinionMap.put(CAT_FARMING, - Utils.createList("WHEAT", "CARROT", "POTATO", "PUMPKIN", "MELON", null, "MUSHROOM", - "COCOA", "CACTUS", "SUGAR_CANE", "CHICKEN", "COW", "PIG", null, "SHEEP", - "RABBIT", "NETHER_WARTS")); - collectionCatToMinionMap.put(CAT_MINING, - Utils.createList("COBBLESTONE", "COAL", "IRON", "GOLD", "DIAMOND", "LAPIS", - "EMERALD", "REDSTONE", "QUARTZ", "OBSIDIAN", "GLOWSTONE", "GRAVEL", "ICE", null, - "SAND", "ENDER_STONE", "SNOW", "MITHRIL", "HARD_STONE", null)); - collectionCatToMinionMap.put(CAT_COMBAT, - Utils.createList("ZOMBIE", "SKELETON", "SPIDER", "CAVESPIDER", "CREEPER", "ENDERMAN", - "GHAST", "SLIME", "BLAZE", "MAGMA_CUBE", "REVENANT", "TARANTULA", "VOIDLING")); - collectionCatToMinionMap.put(CAT_FORAGING, - Utils.createList("OAK", "SPRUCE", "BIRCH", "DARK_OAK", "ACACIA", "JUNGLE", "FLOWER")); - collectionCatToMinionMap.put(CAT_FISHING, - Utils.createList("FISHING", null, null, null, null, - null, "CLAY", null, null, null)); - } - - private static final LinkedHashMap<String, ItemStack> collectionToCollectionDisplayMap = new LinkedHashMap<>(); - - static { - /* FARMING COLLECTIONS **/ - collectionToCollectionDisplayMap.put("WHEAT", Utils.createItemStack(Items.wheat, - EnumChatFormatting.YELLOW + "Wheat")); - collectionToCollectionDisplayMap.put("CARROT_ITEM", Utils.createItemStack(Items.carrot, - EnumChatFormatting.YELLOW + "Carrot")); - collectionToCollectionDisplayMap.put("POTATO_ITEM", Utils.createItemStack(Items.potato, - EnumChatFormatting.YELLOW + "Potato")); - collectionToCollectionDisplayMap.put("PUMPKIN", Utils.createItemStack(Item.getItemFromBlock(Blocks.pumpkin), - EnumChatFormatting.YELLOW + "Pumpkin")); - collectionToCollectionDisplayMap.put("MELON", Utils.createItemStack(Items.melon, - EnumChatFormatting.YELLOW + "Melon")); - collectionToCollectionDisplayMap.put("SEEDS", Utils.createItemStack(Items.wheat_seeds, - EnumChatFormatting.YELLOW + "Seeds")); - collectionToCollectionDisplayMap.put("MUSHROOM_COLLECTION", - Utils.createItemStack(Item.getItemFromBlock(Blocks.red_mushroom) - , EnumChatFormatting.YELLOW + "Mushroom")); - collectionToCollectionDisplayMap.put("INK_SACK:3", Utils.createItemStack(Items.dye, - EnumChatFormatting.YELLOW + "Cocoa Beans", 3)); - collectionToCollectionDisplayMap.put("CACTUS", Utils.createItemStack(Item.getItemFromBlock(Blocks.cactus), - EnumChatFormatting.YELLOW + "Cactus")); - collectionToCollectionDisplayMap.put("SUGAR_CANE", Utils.createItemStack(Items.reeds, - EnumChatFormatting.YELLOW + "Sugar Cane")); - collectionToCollectionDisplayMap.put("FEATHER", Utils.createItemStack(Items.feather, - EnumChatFormatting.YELLOW + "Feather")); - collectionToCollectionDisplayMap.put("LEATHER", Utils.createItemStack(Items.leather, - EnumChatFormatting.YELLOW + "Leather")); - collectionToCollectionDisplayMap.put("PORK", Utils.createItemStack(Items.porkchop, - EnumChatFormatting.YELLOW + "Porkchop")); - collectionToCollectionDisplayMap.put("RAW_CHICKEN", Utils.createItemStack(Items.chicken, - EnumChatFormatting.YELLOW + "Chicken")); - collectionToCollectionDisplayMap.put("MUTTON", Utils.createItemStack(Items.mutton, - EnumChatFormatting.YELLOW + "Mutton")); - collectionToCollectionDisplayMap.put("RABBIT", Utils.createItemStack(Items.rabbit, - EnumChatFormatting.YELLOW + "Rabbit")); - collectionToCollectionDisplayMap.put("NETHER_STALK", Utils.createItemStack(Items.nether_wart, - EnumChatFormatting.YELLOW + "Nether Wart")); - - /* MINING COLLECTIONS **/ - collectionToCollectionDisplayMap.put("COBBLESTONE", Utils.createItemStack(Item.getItemFromBlock(Blocks.cobblestone), - EnumChatFormatting.GRAY + "Cobblestone")); - collectionToCollectionDisplayMap.put("COAL", Utils.createItemStack(Items.coal, - EnumChatFormatting.GRAY + "Coal")); - collectionToCollectionDisplayMap.put("IRON_INGOT", Utils.createItemStack(Items.iron_ingot, - EnumChatFormatting.GRAY + "Iron Ingot")); - collectionToCollectionDisplayMap.put("GOLD_INGOT", Utils.createItemStack(Items.gold_ingot, - EnumChatFormatting.GRAY + "Gold Ingot")); - collectionToCollectionDisplayMap.put("DIAMOND", Utils.createItemStack(Items.diamond, - EnumChatFormatting.GRAY + "Diamond")); - collectionToCollectionDisplayMap.put("INK_SACK:4", Utils.createItemStack(Items.dye, - EnumChatFormatting.GRAY + "Lapis Lazuli", 4)); - collectionToCollectionDisplayMap.put("EMERALD", Utils.createItemStack(Items.emerald, - EnumChatFormatting.GRAY + "Emerald")); - collectionToCollectionDisplayMap.put("REDSTONE", Utils.createItemStack(Items.redstone, - EnumChatFormatting.GRAY + "Redstone")); - collectionToCollectionDisplayMap.put("QUARTZ", Utils.createItemStack(Items.quartz, - EnumChatFormatting.GRAY + "Nether Quartz")); - collectionToCollectionDisplayMap.put("OBSIDIAN", Utils.createItemStack(Item.getItemFromBlock(Blocks.obsidian), - EnumChatFormatting.GRAY + "Obsidian")); - collectionToCollectionDisplayMap.put("GLOWSTONE_DUST", Utils.createItemStack(Items.glowstone_dust, - EnumChatFormatting.GRAY + "Glowstone")); - collectionToCollectionDisplayMap.put("GRAVEL", Utils.createItemStack(Item.getItemFromBlock(Blocks.gravel), - EnumChatFormatting.GRAY + "Gravel")); - collectionToCollectionDisplayMap.put("ICE", Utils.createItemStack(Item.getItemFromBlock(Blocks.ice), - EnumChatFormatting.GRAY + "Ice")); - collectionToCollectionDisplayMap.put("NETHERRACK", Utils.createItemStack(Item.getItemFromBlock(Blocks.netherrack), - EnumChatFormatting.GRAY + "Netherrack")); - collectionToCollectionDisplayMap.put("SAND", Utils.createItemStack(Item.getItemFromBlock(Blocks.sand), - EnumChatFormatting.GRAY + "Sand")); - collectionToCollectionDisplayMap.put("ENDER_STONE", Utils.createItemStack(Item.getItemFromBlock(Blocks.end_stone), - EnumChatFormatting.GRAY + "End Stone")); - collectionToCollectionDisplayMap.put("MITHRIL_ORE", Utils.createItemStack(Items.prismarine_crystals, - EnumChatFormatting.GRAY + "Mithril")); - collectionToCollectionDisplayMap.put("HARD_STONE", Utils.createItemStack(Item.getItemFromBlock(Blocks.stone), - EnumChatFormatting.GRAY + "Hard Stone")); - ItemStack gemstone = Utils.createItemStack(Item.getItemFromBlock(Blocks.stained_glass), - EnumChatFormatting.GRAY + "Gem Stones"); - gemstone.setItemDamage(14); - collectionToCollectionDisplayMap.put("GEMSTONE_COLLECTION", gemstone); - - - /* COMBAT COLLECTIONS **/ - collectionToCollectionDisplayMap.put("ROTTEN_FLESH", Utils.createItemStack(Items.rotten_flesh, - EnumChatFormatting.RED + "Rotten Flesh")); - collectionToCollectionDisplayMap.put("BONE", Utils.createItemStack(Items.bone, - EnumChatFormatting.RED + "Bone")); - collectionToCollectionDisplayMap.put("STRING", Utils.createItemStack(Items.string, - EnumChatFormatting.RED + "String")); - collectionToCollectionDisplayMap.put("SPIDER_EYE", Utils.createItemStack(Items.spider_eye, - EnumChatFormatting.RED + "Spider Eye")); - collectionToCollectionDisplayMap.put("SULPHUR", Utils.createItemStack(Items.gunpowder, - EnumChatFormatting.RED + "Gunpowder")); - collectionToCollectionDisplayMap.put("ENDER_PEARL", Utils.createItemStack(Items.ender_pearl, - EnumChatFormatting.RED + "Ender Pearl")); - collectionToCollectionDisplayMap.put("GHAST_TEAR", Utils.createItemStack(Items.ghast_tear, - EnumChatFormatting.RED + "Ghast Tear")); - collectionToCollectionDisplayMap.put("SLIME_BALL", Utils.createItemStack(Items.slime_ball, - EnumChatFormatting.RED + "Slimeball")); - collectionToCollectionDisplayMap.put("BLAZE_ROD", Utils.createItemStack(Items.blaze_rod, - EnumChatFormatting.RED + "Blaze Rod")); - collectionToCollectionDisplayMap.put("MAGMA_CREAM", Utils.createItemStack(Items.magma_cream, - EnumChatFormatting.RED + "Magma Cream")); - - /* FORAGING COLLECTIONS **/ - collectionToCollectionDisplayMap.put("LOG", Utils.createItemStack(Item.getItemFromBlock(Blocks.log), - EnumChatFormatting.DARK_GREEN + "Oak")); - collectionToCollectionDisplayMap.put("LOG:1", Utils.createItemStack(Item.getItemFromBlock(Blocks.log), - EnumChatFormatting.DARK_GREEN + "Spruce", 1)); - collectionToCollectionDisplayMap.put("LOG:2", Utils.createItemStack(Item.getItemFromBlock(Blocks.log), - EnumChatFormatting.DARK_GREEN + "Birch", 2)); - collectionToCollectionDisplayMap.put("LOG_2:1", Utils.createItemStack(Item.getItemFromBlock(Blocks.log2), - EnumChatFormatting.DARK_GREEN + "Dark Oak", 1)); - collectionToCollectionDisplayMap.put("LOG_2", Utils.createItemStack(Item.getItemFromBlock(Blocks.log2), - EnumChatFormatting.DARK_GREEN + "Acacia")); - collectionToCollectionDisplayMap.put("LOG:3", Utils.createItemStack(Item.getItemFromBlock(Blocks.log), - EnumChatFormatting.DARK_GREEN + "Jungle", 3)); - - /* FISHING COLLECTIONS **/ - collectionToCollectionDisplayMap.put("RAW_FISH", Utils.createItemStack(Items.fish, - EnumChatFormatting.AQUA + "Fish")); - collectionToCollectionDisplayMap.put("RAW_FISH:1", Utils.createItemStack(Items.fish, - EnumChatFormatting.AQUA + "Salmon", 1)); - collectionToCollectionDisplayMap.put("RAW_FISH:2", Utils.createItemStack(Items.fish, - EnumChatFormatting.AQUA + "Clownfish", 2)); - collectionToCollectionDisplayMap.put("RAW_FISH:3", Utils.createItemStack(Items.fish, - EnumChatFormatting.AQUA + "Pufferfish", 3)); - collectionToCollectionDisplayMap.put("PRISMARINE_SHARD", Utils.createItemStack(Items.prismarine_shard, - EnumChatFormatting.AQUA + "Prismarine Shard")); - collectionToCollectionDisplayMap.put("PRISMARINE_CRYSTALS", Utils.createItemStack(Items.prismarine_crystals, - EnumChatFormatting.AQUA + "Prismarine Crystals")); - collectionToCollectionDisplayMap.put("CLAY_BALL", Utils.createItemStack(Items.clay_ball, - EnumChatFormatting.AQUA + "Clay")); - collectionToCollectionDisplayMap.put("WATER_LILY", Utils.createItemStack(Item.getItemFromBlock(Blocks.waterlily), - EnumChatFormatting.AQUA + "Lilypad")); - collectionToCollectionDisplayMap.put("INK_SACK", Utils.createItemStack(Items.dye, - EnumChatFormatting.AQUA + "Ink Sack")); - collectionToCollectionDisplayMap.put("SPONGE", Utils.createItemStack(Item.getItemFromBlock(Blocks.sponge), - EnumChatFormatting.AQUA + "Sponge")); - } + private static final LinkedHashMap<ItemStack, List<String>> collectionCatToCollectionMap = new LinkedHashMap<ItemStack, List<String>>() {{ + put(CAT_FARMING, Utils.createList("WHEAT", "CARROT_ITEM", "POTATO_ITEM", "PUMPKIN", "MELON", "SEEDS", + "MUSHROOM_COLLECTION", "INK_SACK:3", "CACTUS", "SUGAR_CANE", "FEATHER", "LEATHER", "PORK", "RAW_CHICKEN", + "MUTTON", "RABBIT", "NETHER_STALK")); + put(CAT_MINING, Utils.createList("COBBLESTONE", "COAL", "IRON_INGOT", "GOLD_INGOT", "DIAMOND", "INK_SACK:4", + "EMERALD", "REDSTONE", "QUARTZ", "OBSIDIAN", "GLOWSTONE_DUST", "GRAVEL", "ICE", "NETHERRACK", "SAND", + "ENDER_STONE", null, "MITHRIL_ORE", "HARD_STONE", "GEMSTONE_COLLECTION")); + put(CAT_COMBAT, Utils.createList("ROTTEN_FLESH", "BONE", "STRING", "SPIDER_EYE", "SULPHUR", "ENDER_PEARL", + "GHAST_TEAR", "SLIME_BALL", "BLAZE_ROD", "MAGMA_CREAM", null, null, null)); + put(CAT_FORAGING, Utils.createList("LOG", "LOG:1", "LOG:2", "LOG_2:1", "LOG_2", "LOG:3", null)); + put(CAT_FISHING, Utils.createList("RAW_FISH", "RAW_FISH:1", "RAW_FISH:2", "RAW_FISH:3", "PRISMARINE_SHARD", + "PRISMARINE_CRYSTALS", "CLAY_BALL", "WATER_LILY", "INK_SACK", "SPONGE")); + + }}; + + private static final LinkedHashMap<ItemStack, List<String>> collectionCatToMinionMap = new LinkedHashMap<ItemStack, List<String>>() {{ + put(CAT_FARMING, Utils.createList("WHEAT", "CARROT", "POTATO", "PUMPKIN", "MELON", null, "MUSHROOM", + "COCOA", "CACTUS", "SUGAR_CANE", "CHICKEN", "COW", "PIG", null, "SHEEP", "RABBIT", "NETHER_WARTS")); + put(CAT_MINING, Utils.createList("COBBLESTONE", "COAL", "IRON", "GOLD", "DIAMOND", "LAPIS", "EMERALD", + "REDSTONE", "QUARTZ", "OBSIDIAN", "GLOWSTONE", "GRAVEL", "ICE", null, "SAND", "ENDER_STONE", "SNOW", + "MITHRIL", "HARD_STONE", null)); + put(CAT_COMBAT, Utils.createList("ZOMBIE", "SKELETON", "SPIDER", "CAVESPIDER", "CREEPER", "ENDERMAN", + "GHAST", "SLIME", "BLAZE", "MAGMA_CUBE", "REVENANT", "TARANTULA", "VOIDLING")); + put(CAT_FORAGING, Utils.createList("OAK", "SPRUCE", "BIRCH", "DARK_OAK", "ACACIA", "JUNGLE", "FLOWER")); + put(CAT_FISHING, Utils.createList("FISHING", null, null, null, null, null, "CLAY", null, null, null)); + + }}; + + private static final LinkedHashMap<String, ItemStack> collectionToCollectionDisplayMap = new LinkedHashMap<String, ItemStack>() {{ + /* FARMING COLLECTIONS */ + put("WHEAT", Utils.createItemStack(Items.wheat, EnumChatFormatting.YELLOW + "Wheat")); + put("CARROT_ITEM", Utils.createItemStack(Items.carrot, EnumChatFormatting.YELLOW + "Carrot")); + put("POTATO_ITEM", Utils.createItemStack(Items.potato, EnumChatFormatting.YELLOW + "Potato")); + put("PUMPKIN", Utils.createItemStack(Item.getItemFromBlock(Blocks.pumpkin), EnumChatFormatting.YELLOW + "Pumpkin")); + put("MELON", Utils.createItemStack(Items.melon, EnumChatFormatting.YELLOW + "Melon")); + put("SEEDS", Utils.createItemStack(Items.wheat_seeds, EnumChatFormatting.YELLOW + "Seeds")); + put("MUSHROOM_COLLECTION", Utils.createItemStack(Item.getItemFromBlock(Blocks.red_mushroom), EnumChatFormatting.YELLOW + "Mushroom")); + put("INK_SACK:3", Utils.createItemStack(Items.dye, EnumChatFormatting.YELLOW + "Cocoa Beans", 3)); + put("CACTUS", Utils.createItemStack(Item.getItemFromBlock(Blocks.cactus), EnumChatFormatting.YELLOW + "Cactus")); + put("SUGAR_CANE", Utils.createItemStack(Items.reeds, EnumChatFormatting.YELLOW + "Sugar Cane")); + put("FEATHER", Utils.createItemStack(Items.feather, EnumChatFormatting.YELLOW + "Feather")); + put("LEATHER", Utils.createItemStack(Items.leather, EnumChatFormatting.YELLOW + "Leather")); + put("PORK", Utils.createItemStack(Items.porkchop, EnumChatFormatting.YELLOW + "Porkchop")); + put("RAW_CHICKEN", Utils.createItemStack(Items.chicken, EnumChatFormatting.YELLOW + "Chicken")); + put("MUTTON", Utils.createItemStack(Items.mutton, EnumChatFormatting.YELLOW + "Mutton")); + put("RABBIT", Utils.createItemStack(Items.rabbit, EnumChatFormatting.YELLOW + "Rabbit")); + put("NETHER_STALK", Utils.createItemStack(Items.nether_wart, EnumChatFormatting.YELLOW + "Nether Wart")); + + /* MINING COLLECTIONS */ + put("COBBLESTONE", Utils.createItemStack(Item.getItemFromBlock(Blocks.cobblestone), EnumChatFormatting.GRAY + "Cobblestone")); + put("COAL", Utils.createItemStack(Items.coal, EnumChatFormatting.GRAY + "Coal")); + put("IRON_INGOT", Utils.createItemStack(Items.iron_ingot, EnumChatFormatting.GRAY + "Iron Ingot")); + put("GOLD_INGOT", Utils.createItemStack(Items.gold_ingot, EnumChatFormatting.GRAY + "Gold Ingot")); + put("DIAMOND", Utils.createItemStack(Items.diamond, EnumChatFormatting.GRAY + "Diamond")); + put("INK_SACK:4", Utils.createItemStack(Items.dye, EnumChatFormatting.GRAY + "Lapis Lazuli", 4)); + put("EMERALD", Utils.createItemStack(Items.emerald, EnumChatFormatting.GRAY + "Emerald")); + put("REDSTONE", Utils.createItemStack(Items.redstone, EnumChatFormatting.GRAY + "Redstone")); + put("QUARTZ", Utils.createItemStack(Items.quartz, EnumChatFormatting.GRAY + "Nether Quartz")); + put("OBSIDIAN", Utils.createItemStack(Item.getItemFromBlock(Blocks.obsidian), EnumChatFormatting.GRAY + "Obsidian")); + put("GLOWSTONE_DUST", Utils.createItemStack(Items.glowstone_dust, EnumChatFormatting.GRAY + "Glowstone")); + put("GRAVEL", Utils.createItemStack(Item.getItemFromBlock(Blocks.gravel), EnumChatFormatting.GRAY + "Gravel")); + put("ICE", Utils.createItemStack(Item.getItemFromBlock(Blocks.ice), EnumChatFormatting.GRAY + "Ice")); + put("NETHERRACK", Utils.createItemStack(Item.getItemFromBlock(Blocks.netherrack), EnumChatFormatting.GRAY + "Netherrack")); + put("SAND", Utils.createItemStack(Item.getItemFromBlock(Blocks.sand), EnumChatFormatting.GRAY + "Sand")); + put("ENDER_STONE", Utils.createItemStack(Item.getItemFromBlock(Blocks.end_stone), EnumChatFormatting.GRAY + "End Stone")); + put("MITHRIL_ORE", Utils.createItemStack(Items.prismarine_crystals, EnumChatFormatting.GRAY + "Mithril")); + put("HARD_STONE", Utils.createItemStack(Item.getItemFromBlock(Blocks.stone), EnumChatFormatting.GRAY + "Hard Stone")); + put("GEMSTONE_COLLECTION", Utils.createItemStack(Item.getItemFromBlock(Blocks.stained_glass), EnumChatFormatting.GRAY + "Gem Stones", 14)); + + /* COMBAT COLLECTIONS */ + put("ROTTEN_FLESH", Utils.createItemStack(Items.rotten_flesh, EnumChatFormatting.RED + "Rotten Flesh")); + put("BONE", Utils.createItemStack(Items.bone,EnumChatFormatting.RED + "Bone")); + put("STRING", Utils.createItemStack(Items.string, EnumChatFormatting.RED + "String")); + put("SPIDER_EYE", Utils.createItemStack(Items.spider_eye, EnumChatFormatting.RED + "Spider Eye")); + put("SULPHUR", Utils.createItemStack(Items.gunpowder, EnumChatFormatting.RED + "Gunpowder")); + put("ENDER_PEARL", Utils.createItemStack(Items.ender_pearl, EnumChatFormatting.RED + "Ender Pearl")); + put("GHAST_TEAR", Utils.createItemStack(Items.ghast_tear, EnumChatFormatting.RED + "Ghast Tear")); + put("SLIME_BALL", Utils.createItemStack(Items.slime_ball, EnumChatFormatting.RED + "Slimeball")); + put("BLAZE_ROD", Utils.createItemStack(Items.blaze_rod, EnumChatFormatting.RED + "Blaze Rod")); + put("MAGMA_CREAM", Utils.createItemStack(Items.magma_cream, EnumChatFormatting.RED + "Magma Cream")); + + /* FORAGING COLLECTIONS */ + put("LOG", Utils.createItemStack(Item.getItemFromBlock(Blocks.log), EnumChatFormatting.DARK_GREEN + "Oak")); + put("LOG:1", Utils.createItemStack(Item.getItemFromBlock(Blocks.log), EnumChatFormatting.DARK_GREEN + "Spruce", 1)); + put("LOG:2", Utils.createItemStack(Item.getItemFromBlock(Blocks.log), EnumChatFormatting.DARK_GREEN + "Birch", 2)); + put("LOG_2:1", Utils.createItemStack(Item.getItemFromBlock(Blocks.log2), EnumChatFormatting.DARK_GREEN + "Dark Oak", 1)); + put("LOG_2", Utils.createItemStack(Item.getItemFromBlock(Blocks.log2), EnumChatFormatting.DARK_GREEN + "Acacia")); + put("LOG:3", Utils.createItemStack(Item.getItemFromBlock(Blocks.log), EnumChatFormatting.DARK_GREEN + "Jungle", 3)); + + /* FISHING COLLECTIONS */ + put("RAW_FISH", Utils.createItemStack(Items.fish, EnumChatFormatting.AQUA + "Fish")); + put("RAW_FISH:1", Utils.createItemStack(Items.fish, EnumChatFormatting.AQUA + "Salmon", 1)); + put("RAW_FISH:2", Utils.createItemStack(Items.fish, EnumChatFormatting.AQUA + "Clownfish", 2)); + put("RAW_FISH:3", Utils.createItemStack(Items.fish, EnumChatFormatting.AQUA + "Pufferfish", 3)); + put("PRISMARINE_SHARD", Utils.createItemStack(Items.prismarine_shard, EnumChatFormatting.AQUA + "Prismarine Shard")); + put("PRISMARINE_CRYSTALS", Utils.createItemStack(Items.prismarine_crystals, EnumChatFormatting.AQUA + "Prismarine Crystals")); + put("CLAY_BALL", Utils.createItemStack(Items.clay_ball, EnumChatFormatting.AQUA + "Clay")); + put("WATER_LILY", Utils.createItemStack(Item.getItemFromBlock(Blocks.waterlily), EnumChatFormatting.AQUA + "Lilypad")); + put("INK_SACK", Utils.createItemStack(Items.dye, EnumChatFormatting.AQUA + "Ink Sack")); + put("SPONGE", Utils.createItemStack(Item.getItemFromBlock(Blocks.sponge), EnumChatFormatting.AQUA + "Sponge")); + }}; public static LinkedHashMap<ItemStack, List<String>> getCollectionCatToMinionMap() { return collectionCatToMinionMap; @@ -1260,5 +1173,4 @@ public class ProfileViewer { return null; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Constants.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Constants.java index 3524031a..c49608c6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Constants.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Constants.java @@ -8,7 +8,6 @@ import java.util.concurrent.locks.ReentrantLock; import java.util.regex.Pattern; public class Constants { - private static class PatternSerializer implements JsonDeserializer<Pattern>, JsonSerializer<Pattern> { @Override public Pattern deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { @@ -59,5 +58,4 @@ public class Constants { lock.unlock(); } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/DiscordMarkdownBuilder.java b/src/main/java/io/github/moulberry/notenoughupdates/util/DiscordMarkdownBuilder.java index ccffa313..adc0010f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/DiscordMarkdownBuilder.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/DiscordMarkdownBuilder.java @@ -1,7 +1,6 @@ package io.github.moulberry.notenoughupdates.util; public class DiscordMarkdownBuilder { - private final StringBuilder builder; public DiscordMarkdownBuilder() { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java b/src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java index 327637b8..d7d5dcc6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java @@ -3,8 +3,7 @@ package io.github.moulberry.notenoughupdates.util; import net.minecraft.util.ResourceLocation; public class GuiTextures { - - private GuiTextures() {} //Not instantiable. Use import static to access class members. + private GuiTextures() {} // Not instantiable. Use import static to access class members. public static final ResourceLocation itemPaneTabArrow = new ResourceLocation("notenoughupdates:item_pane_tab_arrow.png"); //public static final ResourceLocation prev = new ResourceLocation("notenoughupdates:prev.png"); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/HastebinUploader.java b/src/main/java/io/github/moulberry/notenoughupdates/util/HastebinUploader.java index 127a5177..ac8d5cfc 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/HastebinUploader.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/HastebinUploader.java @@ -14,7 +14,6 @@ import java.nio.charset.StandardCharsets; * @author ThatGravyBoat */ public class HastebinUploader { - private static final String UPLOAD_URL = "https://hst.sh/documents"; private static final String RETURN_URL = "https://hst.sh/"; private static final String RAW_RETURN_URL = "https://hst.sh/raw/"; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/HypixelApi.java b/src/main/java/io/github/moulberry/notenoughupdates/util/HypixelApi.java index abb2a453..923b962a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/HypixelApi.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/HypixelApi.java @@ -147,5 +147,4 @@ public class HypixelApi { } return url.toString(); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/LerpingFloat.java b/src/main/java/io/github/moulberry/notenoughupdates/util/LerpingFloat.java index e66e0edb..c6981467 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/LerpingFloat.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/LerpingFloat.java @@ -1,7 +1,6 @@ package io.github.moulberry.notenoughupdates.util; public class LerpingFloat { - private int timeSpent; private long lastMillis; private final int timeToReachTarget; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/NEUResourceManager.java b/src/main/java/io/github/moulberry/notenoughupdates/util/NEUResourceManager.java index 3d0177d4..e3fa5520 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/NEUResourceManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/NEUResourceManager.java @@ -9,7 +9,6 @@ import java.util.List; import java.util.Set; public class NEUResourceManager implements IResourceManager { - private final IResourceManager parentResourceManager; public NEUResourceManager(IResourceManager parentResourceManager) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java b/src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java index 8cb9bfa7..902092d0 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java @@ -8,7 +8,6 @@ import java.util.HashMap; import java.util.function.Consumer; public class ProfileApiSyncer { - private static final ProfileApiSyncer INSTANCE = new ProfileApiSyncer(); private final HashMap<String, Long> resyncTimes = new HashMap<>(); @@ -71,5 +70,4 @@ public class ProfileApiSyncer { finishSyncCallbacks.clear(); }); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/ReverseWorldRenderer.java b/src/main/java/io/github/moulberry/notenoughupdates/util/ReverseWorldRenderer.java index c34625b6..069ab5c6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/ReverseWorldRenderer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/ReverseWorldRenderer.java @@ -345,7 +345,6 @@ public class ReverseWorldRenderer { break; case UBYTE: case BYTE: - if (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN) { this.byteBuffer.put(i, (byte) red); this.byteBuffer.put(i + 1, (byte) green); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java index fab85dc7..352d2d1a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java @@ -27,7 +27,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class SBInfo { - private static final SBInfo INSTANCE = new SBInfo(); public static SBInfo getInstance() { @@ -127,7 +126,7 @@ public class SBInfo { private static final Pattern SKILL_LEVEL_PATTERN = Pattern.compile("([^0-9:]+) (\\d{1,2})"); public void tick() { - Boolean tempIsInDungeon = false; + boolean tempIsInDungeon = false; long currentTime = System.currentTimeMillis(); @@ -248,5 +247,4 @@ public class SBInfo { e.printStackTrace(); } } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/SpecialColour.java b/src/main/java/io/github/moulberry/notenoughupdates/util/SpecialColour.java index 50f22382..e570edd9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/SpecialColour.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/SpecialColour.java @@ -3,7 +3,6 @@ package io.github.moulberry.notenoughupdates.util; import java.awt.*; public class SpecialColour { - public static String special(int chromaSpeed, int alpha, int rgb) { return special(chromaSpeed, alpha, (rgb & 0xFF0000) >> 16, (rgb & 0x00FF00) >> 8, (rgb & 0x0000FF)); } @@ -90,5 +89,4 @@ public class SpecialColour { return (a & 0xFF) << 24 | (Color.HSBtoRGB(hsv[0], hsv[1], hsv[2]) & 0x00FFFFFF); } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/TexLoc.java b/src/main/java/io/github/moulberry/notenoughupdates/util/TexLoc.java index 8fb31cc4..f41f4414 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/TexLoc.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/TexLoc.java @@ -6,7 +6,6 @@ import org.lwjgl.input.Keyboard; * Utility used for positioning GUI elements during development. */ public class TexLoc { - public int x; public int y; private final int toggleKey; @@ -53,5 +52,4 @@ public class TexLoc { } return false; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java index b965c0c4..f34ba230 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java @@ -50,7 +50,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class Utils { - public static boolean hasEffectOverride = false; public static boolean disableCustomDungColours = false; private static final LinkedList<Integer> guiScales = new LinkedList<>(); @@ -473,21 +472,18 @@ public class Utils { //EnumChatFormatting.AQUA+EnumChatFormatting.BOLD.toString()+"DIVINE", }; - public static final HashMap<String, String> rarityArrMap = new HashMap<>(); - - static { - rarityArrMap.put("COMMON", rarityArrC[0]); - rarityArrMap.put("UNCOMMON", rarityArrC[1]); - rarityArrMap.put("RARE", rarityArrC[2]); - rarityArrMap.put("EPIC", rarityArrC[3]); - rarityArrMap.put("LEGENDARY", rarityArrC[4]); - rarityArrMap.put("MYTHIC", rarityArrC[5]); - rarityArrMap.put("SPECIAL", rarityArrC[6]); - rarityArrMap.put("VERY SPECIAL", rarityArrC[7]); - rarityArrMap.put("DIVINE", rarityArrC[8]); - //rarityArrMap.put("DIVINE", rarityArrC[9]); - - } + public static final HashMap<String, String> rarityArrMap = new HashMap<String, String>() {{ + put("COMMON", rarityArrC[0]); + put("UNCOMMON", rarityArrC[1]); + put("RARE", rarityArrC[2]); + put("EPIC", rarityArrC[3]); + put("LEGENDARY", rarityArrC[4]); + put("MYTHIC", rarityArrC[5]); + put("SPECIAL", rarityArrC[6]); + put("VERY SPECIAL", rarityArrC[7]); + put("DIVINE", rarityArrC[8]); + // put("DIVINE", rarityArrC[9]); + }}; public static String getRarityFromInt(int rarity) { if (rarity < 0 || rarity >= rarityArr.length) { @@ -1355,5 +1351,4 @@ public class Utils { return endsIn; } - } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/XPInformation.java b/src/main/java/io/github/moulberry/notenoughupdates/util/XPInformation.java index 061780cf..cac4cf74 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/XPInformation.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/XPInformation.java @@ -15,7 +15,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class XPInformation { - private static final XPInformation INSTANCE = new XPInformation(); public static XPInformation getInstance() { @@ -209,5 +208,4 @@ public class XPInformation { skillInfoMap.put(skill.toLowerCase(), info); } } - } |