From 98c9718a3d54a74e7700f4015d2624948bd6df0c Mon Sep 17 00:00:00 2001 From: nopothegamer <40329022+nopothegamer@users.noreply.github.com> Date: Tue, 2 Nov 2021 21:22:31 +1100 Subject: Adding skill overlays and hotm stuff in pv + other minor stuff (#15) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * idk where im commiting to * idk where im commiting to * made tita overlay and waypoints work with dwarven overlay off "fixed" divan rarity in neuah made eitherwarp block overlay turn off able * Added change notes * i stopped being pepega and worked out how neu config works * Added mining skill overlay * fixed mining overlay * add option to hide Mining waypoints in Dwarven mines when at location * better check location * Make cata xp in /pv be calculated on how many runs you have * Added master cata xp rates * Make gitignore not show as changed * Added warnings to some things in /neu * maybe fix hiding waypoints * Added a fishing skill overlay its kinda scuffed because of the interp stuff * Hopefully fix Rampart's quarry (for real now) * Moul said i could no one leak in general or smth * Cache itemstacks in miningoverlay and crystalhollows overlay (untested) * Fix preinit crash due to manager not existing yet * Make tab do the same as down button while in tab completion mode * remove debug print * Added pitch to farming overlay * Changed the panoramas back to the old one because ery is scuffed * isnt finished but should work for ery * Made it so if ur mining 60 it just says maxed level instead of b u g * Made skills not show int limit when at max level in skill overlays * wh :omegalul: made neu * sad you cant type that long in search bar * Hello don't mind me just improving your workflow * æ * Oh also this * Added the cata xp scaling(idk if m3 and 4 values are right) * Added Expertise Progress * Fix farming overlay * Added cult/crops to next cult level * Go to the other end of the tab-completion List when hitting the end * remove debug prints * added combat skill overlay and some changes to the others (combat doesnt work rn could someone look into it :prayge:) * Added cooldown to god pot showing in todo overlay * comment * Added option to remove enchant glint in storage gui * Added option to remove enchant glint in storage gui * please fix * please fix * Fixed the placement of help.png * Added fairy soul waypoints to misc * unclear not clear * Added dg partner cape * fix space cape * Fix space cape * Make it so you can hold down keys in sign GUIs * Added a button in storage menu to open the settings Added an option to change the click names for /pv to /ah * Made it so ur config doesnt reset * Added bhop (shhh dont tell anyone) * Added a help menu to /neuec * changed fisgifis overlay button no work * make working fishing tiemr * jani can you test this out for us * Added a gui locations tab * very important feature * Fixed wart hoe overlay if not alch 50 * Make it so the ding time is customizable * Added coins/m to farming overlay * Basic mining tab in pv * Just for jani * Just for jani v2 * works ig * my balls * hotm pv is mostly done missing some perks * hotm pv done * message goes here * push so i can pr jani * Final hotm pv texture + fix m3 and m4 cata xp * edit: didnt work * fixed up stuff dokm said * added image for hotm pv * Fixed previews for furf and dg capes * removed combat overlay from location gui menu in /neu * Start of a custom pv page * Removed custom pv because -2 people would use it Removed neubhop (found out bhop is bannable) * update build gradle Co-authored-by: Lulonaut Co-authored-by: Lulonaut <67191924+Lulonaut@users.noreply.github.com> Co-authored-by: DoKM Co-authored-by: TymanWasTaken Co-authored-by: MicrocontrollersDev Co-authored-by: jani270 --- .../moulberry/notenoughupdates/CustomItems.java | 6 + .../notenoughupdates/NEUEventListener.java | 21 +- .../moulberry/notenoughupdates/NEUOverlay.java | 4 + .../notenoughupdates/auction/CustomAH.java | 6 +- .../core/config/annotations/ConfigEditorFSR.java | 16 + .../core/config/gui/GuiOptionEditorFSR.java | 63 + .../core/config/struct/ConfigProcessor.java | 4 + .../notenoughupdates/cosmetics/CapeManager.java | 1 + .../notenoughupdates/itemeditor/NEUItemEditor.java | 5 + .../miscfeatures/CustomItemEffects.java | 2 +- .../miscfeatures/DwarvenMinesWaypoints.java | 8 +- .../notenoughupdates/miscfeatures/FairySouls.java | 8 +- .../notenoughupdates/miscgui/GuiEnchantColour.java | 54 + .../notenoughupdates/miscgui/GuiItemCustomize.java | 2 +- .../notenoughupdates/miscgui/StorageOverlay.java | 30 +- .../notenoughupdates/options/NEUConfig.java | 26 + .../options/seperateSections/Dungeons.java | 23 + .../options/seperateSections/ItemOverlays.java | 9 + .../options/seperateSections/LocationEdit.java | 138 +++ .../options/seperateSections/Mining.java | 26 +- .../options/seperateSections/Misc.java | 61 +- .../options/seperateSections/SkillOverlays.java | 178 ++- .../options/seperateSections/StorageGUI.java | 21 +- .../overlays/AuctionSearchOverlay.java | 154 +-- .../overlays/CrystalHollowOverlay.java | 77 +- .../notenoughupdates/overlays/FarmingOverlay.java | 153 ++- .../overlays/FishingSkillOverlay.java | 377 ++++++ .../notenoughupdates/overlays/MiningOverlay.java | 132 +-- .../overlays/MiningSkillOverlay.java | 344 ++++++ .../notenoughupdates/overlays/OverlayManager.java | 47 +- .../profileviewer/GuiProfileViewer.java | 1208 +++++++++++++++++++- .../profileviewer/ProfileViewer.java | 4 +- .../notenoughupdates/util/GuiTextures.java | 1 + .../moulberry/notenoughupdates/util/Utils.java | 39 +- 34 files changed, 2975 insertions(+), 273 deletions(-) create mode 100644 src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorFSR.java create mode 100644 src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorFSR.java create mode 100644 src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/LocationEdit.java create mode 100644 src/main/java/io/github/moulberry/notenoughupdates/overlays/FishingSkillOverlay.java create mode 100644 src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningSkillOverlay.java (limited to 'src/main/java/io') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java b/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java index 7eefac6a..5cadd856 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java @@ -70,6 +70,12 @@ public class CustomItems { "Your life has been a lie,", "the moon is made out of iron." ); + public static JsonObject NOPO = create( + "nopo", + "writable_book", + "Nopo", + "We do a lil Chatting" + ); /** * SHAAAAAAAAAAAAAAAAAAME diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java index 527abd02..aca9a8c5 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java @@ -204,7 +204,10 @@ public class NEUEventListener { @SubscribeEvent public void onTick(TickEvent.ClientTickEvent event) { - if (Minecraft.getMinecraft().currentScreen == null || !(Minecraft.getMinecraft().currentScreen instanceof GuiChat)) { + if (Minecraft.getMinecraft().currentScreen != null && (Minecraft.getMinecraft().currentScreen instanceof GuiChat + || Minecraft.getMinecraft().currentScreen instanceof GuiEditSign || Minecraft.getMinecraft().currentScreen instanceof GuiScreenBook)) { + Keyboard.enableRepeatEvents(true); + } else { Keyboard.enableRepeatEvents(false); } if (event.phase != TickEvent.Phase.START) return; @@ -240,7 +243,7 @@ public class NEUEventListener { inventoryLoadedTicks = 3; } - if (Keyboard.isKeyDown(Keyboard.KEY_NUMPAD1) && Keyboard.isKeyDown(Keyboard.KEY_NUMPAD4) && Keyboard.isKeyDown(Keyboard.KEY_NUMPAD9)) { + if ((Keyboard.isKeyDown(Keyboard.KEY_NUMPAD1) && Keyboard.isKeyDown(Keyboard.KEY_NUMPAD4) && Keyboard.isKeyDown(Keyboard.KEY_NUMPAD9))) { ChatComponentText component = new ChatComponentText("\u00a7cYou are permanently banned from this server!"); component.appendText("\n"); component.appendText("\n\u00a77Reason: \u00a7rSuspicious account activity/Other"); @@ -793,13 +796,17 @@ public class NEUEventListener { private IChatComponent replaceSocialControlsWithPV(IChatComponent chatComponent) { - if (NotEnoughUpdates.INSTANCE.config.misc.replaceSocialOptions && chatComponent.getChatStyle() != null && chatComponent.getChatStyle().getChatClickEvent() != null && chatComponent.getChatStyle().getChatClickEvent().getAction() == ClickEvent.Action.RUN_COMMAND) { + if (NotEnoughUpdates.INSTANCE.config.misc.replaceSocialOptions1 > 0 && chatComponent.getChatStyle() != null && chatComponent.getChatStyle().getChatClickEvent() != null && chatComponent.getChatStyle().getChatClickEvent().getAction() == ClickEvent.Action.RUN_COMMAND) { if (chatComponent.getChatStyle().getChatClickEvent().getValue().startsWith("/socialoptions")) { String username = chatComponent.getChatStyle().getChatClickEvent().getValue().substring(15); - - chatComponent.setChatStyle(Utils.createClickStyle(ClickEvent.Action.RUN_COMMAND, "/pv " + username, "" + EnumChatFormatting.YELLOW + "Click to open " + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + username + EnumChatFormatting.RESET + EnumChatFormatting.YELLOW + "'s profile in " + EnumChatFormatting.DARK_PURPLE + EnumChatFormatting.BOLD + "NEU's" + EnumChatFormatting.RESET + EnumChatFormatting.YELLOW + " profile viewer.")); - return chatComponent; - } + if (NotEnoughUpdates.INSTANCE.config.misc.replaceSocialOptions1 == 1) { + chatComponent.setChatStyle(Utils.createClickStyle(ClickEvent.Action.RUN_COMMAND, "/pv " + username, "" + EnumChatFormatting.YELLOW + "Click to open " + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + username + EnumChatFormatting.RESET + EnumChatFormatting.YELLOW + "'s profile in " + EnumChatFormatting.DARK_PURPLE + EnumChatFormatting.BOLD + "NEU's" + EnumChatFormatting.RESET + EnumChatFormatting.YELLOW + " profile viewer.")); + return chatComponent; + } else if (NotEnoughUpdates.INSTANCE.config.misc.replaceSocialOptions1 == 2) { + chatComponent.setChatStyle(Utils.createClickStyle(ClickEvent.Action.RUN_COMMAND, "/ah " + username, "" + EnumChatFormatting.YELLOW + "Click to open " + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + username + EnumChatFormatting.RESET + EnumChatFormatting.YELLOW + "'s /ah page")); + return chatComponent; + } + } // wanted to add this for guild but guild uses uuid :sad: } return chatComponent; } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index f40c60cd..adf0df8b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -1308,6 +1308,10 @@ public class NEUOverlay extends Gui { case "ironm00n": searchedItems.add(CustomItems.IRONM00N); break; + case "nopo": + case "nopothegamer": + searchedItems.add(CustomItems.NOPO); + break; } this.searchedItems = searchedItems; 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 6f3209b2..75af7de1 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java @@ -144,12 +144,12 @@ public class CustomAH extends Gui { private static final int SORT_MODE_LOW = 1; private static final int SORT_MODE_SOON = 2; - // private static final String[] rarities = {"COMMON", "UNCOMMON", "RARE", "EPIC", -// "LEGENDARY", "MYTHIC", "SPECIAL", "VERY SPECIAL", "SUPREME"}; +// private static final String[] rarities = {"COMMON", "UNCOMMON", "RARE", "EPIC", +// "LEGENDARY", "MYTHIC", "SPECIAL", "VERY SPECIAL", "SUPREME", "DIVINE"}; private static final String[] rarityColours = {"" + EnumChatFormatting.WHITE, "" + EnumChatFormatting.GREEN, "" + EnumChatFormatting.BLUE, "" + EnumChatFormatting.DARK_PURPLE, "" + EnumChatFormatting.GOLD, "" + EnumChatFormatting.LIGHT_PURPLE, "" + EnumChatFormatting.RED, - "" + EnumChatFormatting.RED, "" + EnumChatFormatting.DARK_RED}; + "" + EnumChatFormatting.RED,"" + EnumChatFormatting.AQUA, "" + EnumChatFormatting.AQUA}; private static final int BIN_FILTER_ALL = 0; private static final int BIN_FILTER_BIN = 1; 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 new file mode 100644 index 00000000..e6ec3548 --- /dev/null +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorFSR.java @@ -0,0 +1,16 @@ +package io.github.moulberry.notenoughupdates.core.config.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +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/gui/GuiOptionEditorFSR.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorFSR.java new file mode 100644 index 00000000..545241c0 --- /dev/null +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorFSR.java @@ -0,0 +1,63 @@ +package io.github.moulberry.notenoughupdates.core.config.gui; + +import io.github.moulberry.notenoughupdates.core.config.Config; +import io.github.moulberry.notenoughupdates.core.config.struct.ConfigProcessor; +import io.github.moulberry.notenoughupdates.core.util.render.RenderUtils; +import io.github.moulberry.notenoughupdates.core.util.render.TextRenderUtils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.GlStateManager; +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; + + public GuiOptionEditorFSR(ConfigProcessor.ProcessedOption option, int runnableId, String buttonText, Config config) { + super(option); + this.runnableId = runnableId; + this.config = config; + + this.buttonText = buttonText; + if (this.buttonText != null && this.buttonText.isEmpty()) this.buttonText = null; + } + + @Override + public void render(int x, int y, int width) { + super.render(x, y, width); + + int height = getHeight(); + + GlStateManager.color(1, 1, 1, 1); + Minecraft.getMinecraft().getTextureManager().bindTexture(button_fsr); + RenderUtils.drawTexturedRect(x + width / 6 - 24, y + height - 7 - 14, 48, 16); + + if (buttonText != null) { + TextRenderUtils.drawStringCenteredScaledMaxWidth(buttonText, Minecraft.getMinecraft().fontRendererObj, + x + width / 6, y + height - 7 - 6, + false, 44, 0xFF303030); + } + } + + @Override + public boolean mouseInput(int x, int y, int width, int mouseX, int mouseY) { + if (Mouse.getEventButtonState()) { + int height = getHeight(); + if (mouseX > x + width / 6 - 24 && mouseX < x + width / 6 + 24 && + mouseY > y + height - 7 - 14 && mouseY < y + height - 7 + 2) { + config.executeRunnable(runnableId); + return true; + } + } + + return false; + } + + @Override + public boolean keyboardInput() { + return false; + } +} 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 b1581458..3c4e6833 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 @@ -115,6 +115,10 @@ public class ConfigProcessor { ConfigEditorButton configEditorAnnotation = optionField.getAnnotation(ConfigEditorButton.class); editor = new GuiOptionEditorButton(option, configEditorAnnotation.runnableId(), configEditorAnnotation.buttonText(), config); } + if (optionField.isAnnotationPresent(ConfigEditorFSR.class)) { + ConfigEditorFSR configEditorAnnotation = optionField.getAnnotation(ConfigEditorFSR.class); + editor = new GuiOptionEditorFSR(option, configEditorAnnotation.runnableId(), configEditorAnnotation.buttonText(), config); + } if (optionType.isAssignableFrom(boolean.class) && optionField.isAnnotationPresent(ConfigEditorBoolean.class)) { editor = new GuiOptionEditorBoolean(option); 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 d1344150..768c316b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java @@ -79,6 +79,7 @@ public class CapeManager { new CapeData("sbp", true, false), new CapeData("sharex", true, false), new CapeData("sharex_white", true, false), + new CapeData("dg", true, false), //Content Creator new CapeData("jakethybro", false, true), 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 963c04bf..165e30a5 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java @@ -127,6 +127,11 @@ public class NEUItemEditor extends GuiScreen { })); rightOptions.add(new GuiElementButton("Add enchant glint", Color.ORANGE.getRGB(), () -> nbttag.setTag("ench", new NBTTagList()))); + rightOptions.add(new GuiElementButton("Remove timestamp/uuid", Color.RED.getRGB(), () -> { + nbttag.getCompoundTag("ExtraAttributes").removeTag("uuid"); + nbttag.getCompoundTag("ExtraAttributes").removeTag("timestamp"); + })); + resetScrollToTop(); } 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 e592a503..34b444c6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java @@ -556,7 +556,7 @@ public class CustomItemEffects { if (dist != 0) { etherwarpRaycast = raycast(Minecraft.getMinecraft().thePlayer, 1f, dist, 0.1f); - if (etherwarpRaycast != null) { + if (etherwarpRaycast != null && NotEnoughUpdates.INSTANCE.config.itemOverlays.enableEtherwarpBlockOverlay) { AxisAlignedBB bb = etherwarpRaycast.state.getBlock().getSelectedBoundingBox(Minecraft.getMinecraft().theWorld, etherwarpRaycast.pos) .expand(0.01D, 0.01D, 0.01D).offset(-d0, -d1, -d2); drawFilledBoundingBox(bb, 1f, NotEnoughUpdates.INSTANCE.config.itemOverlays.etherwarpHighlightColour); 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 dec3f7d7..629b42d6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java @@ -193,7 +193,6 @@ public class DwarvenMinesWaypoints { if (!SBInfo.getInstance().getLocation().equals("mining_3")) return; int locWaypoint = NotEnoughUpdates.INSTANCE.config.mining.locWaypoints; - if (dynamicLocation != null && dynamicName != null && System.currentTimeMillis() - dynamicMillis < 30 * 1000) { for (Map.Entry entry : waypointsMap.entrySet()) { @@ -203,14 +202,17 @@ public class DwarvenMinesWaypoints { } } } - + String skyblockLocation = SBInfo.getInstance().location.toLowerCase(); if (locWaypoint >= 1) { for (Map.Entry entry : waypointsMap.entrySet()) { if (locWaypoint >= 2) { RenderUtils.renderWayPoint(EnumChatFormatting.AQUA + entry.getKey(), entry.getValue(), event.partialTicks); } else { + String commissionLocation = entry.getKey().toLowerCase(); for (String commissionName : MiningOverlay.commissionProgress.keySet()) { - if (commissionName.toLowerCase().contains(entry.getKey().toLowerCase())) { + if (NotEnoughUpdates.INSTANCE.config.mining.hideWaypointIfAtLocation) + if (commissionLocation.replace("'", "").equals(skyblockLocation)) continue; + if (commissionName.toLowerCase().contains(commissionLocation)) { if (commissionName.contains("Titanium")) { RenderUtils.renderWayPoint(EnumChatFormatting.WHITE + entry.getKey(), entry.getValue(), event.partialTicks); } else { 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 95dde052..faef1bcf 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java @@ -94,7 +94,7 @@ public class FairySouls { } public static void tick() { - if (!enabled) return; + if (!NotEnoughUpdates.INSTANCE.config.misc.fariySoul) return; if (Minecraft.getMinecraft().theWorld == null) { currentSoulList = null; @@ -161,7 +161,7 @@ public class FairySouls { @SubscribeEvent public void onRenderLast(RenderWorldLastEvent event) { - if (!enabled) return; + if (!NotEnoughUpdates.INSTANCE.config.misc.fariySoul) return; String location = SBInfo.getInstance().getLocation(); if (location == null) return; @@ -204,12 +204,12 @@ public class FairySouls { case "on": case "enable": print(EnumChatFormatting.DARK_PURPLE + "Enabled fairy soul waypoints"); - enabled = true; + NotEnoughUpdates.INSTANCE.config.misc.fariySoul = true; return; case "off": case "disable": print(EnumChatFormatting.DARK_PURPLE + "Disabled fairy soul waypoints"); - enabled = false; + NotEnoughUpdates.INSTANCE.config.misc.fariySoul = false; return; case "clear": { String location = SBInfo.getInstance().getLocation(); 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 6ba0b34b..87084199 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java @@ -10,9 +10,11 @@ import io.github.moulberry.notenoughupdates.options.NEUConfig; import io.github.moulberry.notenoughupdates.util.Constants; import io.github.moulberry.notenoughupdates.util.Utils; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; @@ -31,6 +33,8 @@ import java.util.List; import java.util.regex.Matcher; 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"); @@ -183,6 +187,56 @@ public class GuiEnchantColour extends GuiScreen { yIndex++; } renderSideBar(mouseX, mouseY, partialTicks); + FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; + List tooltipToDisplay = null; + GlStateManager.color(1, 1, 1, 1); + Minecraft.getMinecraft().getTextureManager().bindTexture(help); + Utils.drawTexturedRect(guiLeft + xSize + 3, guiTopSidebar - 18, 16, 16, GL11.GL_NEAREST); + + if (mouseX >= guiLeft + xSize + 3 && mouseX < guiLeft + xSize + 19) { + if (mouseY >= guiTopSidebar - 18 && mouseY <= guiTopSidebar - 2) { + tooltipToDisplay = Lists.newArrayList( + EnumChatFormatting.AQUA+"NEUEC Colouring Guide", + EnumChatFormatting.GREEN+"", + EnumChatFormatting.GREEN+"How to use the GUI", + EnumChatFormatting.YELLOW+"Type the name of the enchant you want to colour in the left box", + EnumChatFormatting.YELLOW+"Change the comparison: ", + EnumChatFormatting.RED+"> "+EnumChatFormatting.YELLOW+"greater than a level ", + EnumChatFormatting.RED+"= "+EnumChatFormatting.YELLOW+"equals the level ", + EnumChatFormatting.RED+"< "+EnumChatFormatting.YELLOW+"less than a level", + EnumChatFormatting.YELLOW+"Put the level of enchant you want to color in the middle box", + EnumChatFormatting.YELLOW+"Put the color code you want to use here", + EnumChatFormatting.GREEN+"", + EnumChatFormatting.GREEN+"Available colour codes:", + Utils.chromaString("z = Chroma"), + EnumChatFormatting.DARK_BLUE+"1 = Dark Blue", + EnumChatFormatting.DARK_GREEN+"2 = Dark Green", + EnumChatFormatting.DARK_AQUA+"3 = Dark Aqua", + EnumChatFormatting.DARK_RED+"4 = Dark Red", + EnumChatFormatting.DARK_PURPLE+"5 = Dark Purple", + EnumChatFormatting.GOLD+"6 = Gold", + EnumChatFormatting.GRAY+"7 = Gray", + EnumChatFormatting.DARK_GRAY+"8 = Dark Gray", + EnumChatFormatting.BLUE+"9 = Blue", + EnumChatFormatting.GREEN+"a = Green", + EnumChatFormatting.AQUA+"b = Aqua", + EnumChatFormatting.RED+"c = Red", + EnumChatFormatting.LIGHT_PURPLE+"d = Purple", + EnumChatFormatting.YELLOW+"e = Yellow", + EnumChatFormatting.WHITE+"f = White", + "\u00A7ZZ = SBA Chroma"+EnumChatFormatting.RESET+EnumChatFormatting.GRAY+" (Requires SBA)", + "", + EnumChatFormatting.GREEN+"Available formatting:", + EnumChatFormatting.GRAY+""+EnumChatFormatting.BOLD+"B = "+EnumChatFormatting.BOLD+"Bold", + EnumChatFormatting.GRAY+""+EnumChatFormatting.STRIKETHROUGH+"S"+EnumChatFormatting.RESET+EnumChatFormatting.GRAY+" = "+EnumChatFormatting.STRIKETHROUGH+"Strikethrough", + EnumChatFormatting.GRAY+""+EnumChatFormatting.UNDERLINE+"U"+EnumChatFormatting.RESET+EnumChatFormatting.GRAY+" = "+EnumChatFormatting.UNDERLINE+"Underline", + EnumChatFormatting.GRAY+""+EnumChatFormatting.ITALIC+"I"+EnumChatFormatting.RESET+EnumChatFormatting.GRAY+" = "+EnumChatFormatting.ITALIC+"Italic" + ); + Utils.drawHoveringText(tooltipToDisplay, mouseX, mouseY, width, height, -1, fr); + tooltipToDisplay = null; + } + } + } private void renderSideBar(int mouseX, int mouseY, float partialTicks) { 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 d0cb3f92..5678a832 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java @@ -185,7 +185,7 @@ public class GuiItemCustomize extends GuiScreen { Minecraft.getMinecraft().getTextureManager().bindTexture(GuiTextures.help); GlStateManager.color(1, 1, 1, 1); - int helpX = xCenter+textFieldRename.getWidth()/2-10; + int helpX = xCenter+textFieldRename.getWidth()/2-5; Utils.drawTexturedRect(helpX, yTop, 20, 20, GL11.GL_LINEAR); if(mouseX >= helpX && mouseX <= helpX+20 && mouseY >= yTop && mouseY <= yTop+20) { 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 abef4db6..da8ac561 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java @@ -29,6 +29,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.ClientCommandHandler; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; @@ -1146,6 +1147,9 @@ public class StorageOverlay extends GuiElement { case 7: vIndex = NotEnoughUpdates.INSTANCE.config.storageGUI.searchBarAutofocus ? 1 : 0; break; + case 8: + vIndex = NotEnoughUpdates.INSTANCE.config.storageGUI.showEnchantGlint ? 1 : 0; + break; } Utils.drawTexturedRect(buttonX, buttonY, 16, 16, minU, maxU, (vIndex * 16) / 256f, (vIndex * 16 + 16) / 256f, GL11.GL_NEAREST); @@ -1232,6 +1236,21 @@ public class StorageOverlay extends GuiElement { "Off" ); break; + case 8: + tooltipToDisplay = createTooltip( + "Show Enchant Glint", + NotEnoughUpdates.INSTANCE.config.storageGUI.showEnchantGlint ? 0 : 1, + "On", + "Off" + ); + break; + case 9: + tooltipToDisplay = createTooltip( + "Open Full Settings", + 0, + "Click To Open" + ); + break; } } } @@ -1741,6 +1760,13 @@ public class StorageOverlay extends GuiElement { NotEnoughUpdates.INSTANCE.config.storageGUI.searchBarAutofocus = !NotEnoughUpdates.INSTANCE.config.storageGUI.searchBarAutofocus; break; + case 8: + NotEnoughUpdates.INSTANCE.config.storageGUI.showEnchantGlint = + !NotEnoughUpdates.INSTANCE.config.storageGUI.showEnchantGlint; + break; + case 9: + ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/neu storage gui"); + break; } dirty = true; } @@ -1963,7 +1989,9 @@ public class StorageOverlay extends GuiElement { private void renderEnchOverlay(Set locations) { float f = (float) (Minecraft.getSystemTime() % 3000L) / 3000.0F / 8.0F; float f1 = (float) (Minecraft.getSystemTime() % 4873L) / 4873.0F / 8.0F; - Minecraft.getMinecraft().getTextureManager().bindTexture(RES_ITEM_GLINT); + if (NotEnoughUpdates.INSTANCE.config.storageGUI.showEnchantGlint) { + Minecraft.getMinecraft().getTextureManager().bindTexture(RES_ITEM_GLINT); + } GL11.glPushMatrix(); for (Vector2f loc : locations) { 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 1d7d6876..1a420218 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java @@ -83,6 +83,24 @@ public class NEUConfig extends Config { return; case 10: editOverlay(activeConfigCategory, OverlayManager.crystalHollowOverlay, mining.crystalHollowOverlayPosition); + return; + case 11: + editOverlay(activeConfigCategory, OverlayManager.miningSkillOverlay, skillOverlays.miningPosition); + return; + case 12: + ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/dn"); + return; + case 13: + ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/pv"); + return; + case 14: + editOverlay(activeConfigCategory, OverlayManager.fishingSkillOverlay, skillOverlays.fishingPosition); + return; + case 16: + ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/neusouls clear"); + return; + case 17: + ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/neusouls unclear"); } } @@ -93,6 +111,13 @@ public class NEUConfig extends Config { ) public Misc misc = new Misc(); + @Expose + @Category( + name = "GUI Locations", + desc = "Edit the GUI locations of everything here" + ) + public LocationEdit locationedit = new LocationEdit(); + @Expose @Category( name = "Notifications", @@ -240,6 +265,7 @@ public class NEUConfig extends Config { ) public AccessoryBag accessoryBag = new AccessoryBag(); + @Expose @Category( name = "Api Key", 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 9ba71505..ca1ae0d8 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,17 @@ public class Dungeons { ) @ConfigEditorAccordion(id = 0) public boolean dungeonMapAccordion = false; + @Expose + @ConfigOption( + name = "\u00A7cWarning", + desc = "If you are on Entrance, Floor 1 or Master 1 the map wont work properly" + ) + @ConfigEditorFSR( + runnableId = 12, + buttonText = "" + ) + @ConfigAccordionId(id = 0) + public boolean dungeonF1Warning = false; @Expose @ConfigOption( @@ -98,8 +109,20 @@ public class Dungeons { name = "Dungeon Block Overlay", desc = "" ) + @ConfigEditorAccordion(id = 2) public boolean dungeonBlocksAccordion = false; + @ConfigOption( + name = "\u00A7cWarning", + desc = "You need Fast Render and Antialiasing off for these settings to work\n" + + "You can find these in your video settings" + ) + @ConfigEditorFSR( + runnableId = 12, + buttonText = "" + ) + @ConfigAccordionId(id = 2) + public boolean dungeonBlockWarning = false; @Expose @ConfigOption( diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ItemOverlays.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ItemOverlays.java index 6b4124ea..1a663467 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ItemOverlays.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ItemOverlays.java @@ -196,6 +196,15 @@ public class ItemOverlays { @ConfigAccordionId(id = 7) public boolean enableEtherwarpHelperOverlay = true; + @Expose + @ConfigOption( + name = "Enable etherwarp block overlay", + desc = "Display an overlay that tells you what block you will TP to." + ) + @ConfigEditorBoolean + @ConfigAccordionId(id = 7) + public boolean enableEtherwarpBlockOverlay = true; + @Expose @ConfigOption( name = "Highlight Colour", 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 new file mode 100644 index 00000000..edd0ad46 --- /dev/null +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/LocationEdit.java @@ -0,0 +1,138 @@ +package io.github.moulberry.notenoughupdates.options.seperateSections; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.notenoughupdates.core.config.Position; +import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigAccordionId; +import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorButton; +import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigOption; + +public class LocationEdit { + @Expose + @ConfigOption( + name = "Edit Dungeon Map", + desc = "The NEU dungeon map has it's own editor (/neumap).\n" + + "Click the button on the left to open it" + ) + @ConfigEditorButton( + runnableId = 0, + buttonText = "Edit" + ) + public int editDungeonMap = 0; + + @Expose + @ConfigOption( + name = "Overlay Position", + desc = "Change the position of the Dwarven Mines information Overlay (commisions, powder & forge statuses)" + ) + @ConfigEditorButton( + runnableId = 1, + buttonText = "Edit" + ) + public Position overlayPosition = new Position(10, 100); + + @Expose + @ConfigOption( + name = "Fuel Bar Position", + desc = "Set the position of the drill fuel bar" + ) + @ConfigEditorButton( + runnableId = 2, + buttonText = "Edit" + ) + public Position drillFuelBarPosition = new Position(0, -100, true, false); + + @Expose + @ConfigOption( + name = "Farming Position", + desc = "Change the position of the Farming overlay" + ) + @ConfigEditorButton( + runnableId = 3, + buttonText = "Edit" + ) + public Position farmingPosition = new Position(10, 200); + + @Expose + @ConfigOption( + name = "Pet Info Position", + desc = "The position of the pet info." + ) + @ConfigEditorButton( + runnableId = 4, + buttonText = "Edit" + ) + public Position petInfoPosition = new Position(-1, -1); + + @Expose + @ConfigOption( + name = "Todo Position", + desc = "Change the position of the Todo overlay" + ) + @ConfigEditorButton( + runnableId = 5, + buttonText = "Edit" + ) + @ConfigAccordionId(id = 0) + public Position todoPosition = new Position(100, 0); + + @Expose + @ConfigOption( + name = "Edit Toolbar Positions", + desc = "Edit the position of the QuickCommands / Search Bar" + ) + @ConfigEditorButton(runnableId = 6, buttonText = "Edit") + public boolean positionButton = true; + + @Expose + @ConfigOption( + name = "Open Button Editor", + desc = "Open button editor GUI (/neubuttons)" + ) + @ConfigEditorButton(runnableId = 7, buttonText = "Open") + public boolean openEditorButton = true; + + @Expose + @ConfigOption( + name = "Bonemerang Overlay Position", + desc = "The position of the Bonemerang overlay." + ) + @ConfigEditorButton( + runnableId = 9, + buttonText = "Edit" + ) + public Position bonemerangPosition = new Position(-1, -1); + + @Expose + @ConfigOption( + name = "Overlay Position", + desc = "Change the position of the Crystal Hollows Overlay." + ) + @ConfigEditorButton( + runnableId = 10, + buttonText = "Edit" + ) + public Position crystalHollowOverlayPosition = new Position(200, 0); + + @Expose + @ConfigOption( + name = "Mining Position", + desc = "Change the position of the Mining overlay" + ) + @ConfigEditorButton( + runnableId = 11, + buttonText = "Edit" + ) + public Position miningPosition = new Position(10, 200); + + @Expose + @ConfigOption( + name = "Fishing Position", + desc = "Change the position of the Fishing overlay" + ) + @ConfigEditorButton( + runnableId = 14, + buttonText = "Edit" + ) + public Position fishingPosition = 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 2c05d553..10cfb9dd 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 @@ -29,6 +29,16 @@ public class Mining { @ConfigAccordionId(id = 0) public int locWaypoints = 1; + @Expose + @ConfigOption( + name = "Hide waypoints when at Location", + desc = "Hides the Commission Waypoints if you are already at the location of the waypoint.\n" + + "Only active if Waypoints are set to \"Commissions Only\"" + ) + @ConfigEditorBoolean + @ConfigAccordionId(id = 0) + public boolean hideWaypointIfAtLocation = true; + @Expose @ConfigOption( name = "Emissary Waypoints", @@ -489,20 +499,4 @@ public class Mining { ) @ConfigEditorBoolean public boolean dwarvenTextures = false; - - /*@Expose - @ConfigOption( - name = "Don't Mine Stone", - desc = "Prevent mining stone blocks in mining areas" - ) - @ConfigEditorBoolean - public boolean dontMineStone = true; - - @Expose - @ConfigOption( - name = "Reveal Mist Creepers", - desc = "Make the creepers in the Dwarven Mines mist visible" - ) - @ConfigEditorBoolean - public boolean revealMistCreepers = true;*/ } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java index fddf84e3..295ec5d8 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java @@ -28,6 +28,45 @@ public class Misc { @ConfigEditorBoolean public boolean streamerMode = false; + @ConfigOption( + name = "Fairy Soul Waypoints", + desc = "" + ) + @ConfigEditorAccordion(id = 0) + public boolean fariySoulAccordion = false; + @Expose + @ConfigOption( + name = "Fairy Souls Finder", + desc = "Shows waypoints to fairy souls (/neusouls)" + ) + @ConfigEditorBoolean + @ConfigAccordionId(id = 0) + public boolean fariySoul = false; + + @Expose + @ConfigOption( + name = "Clear Fairy Souls", + desc = "Clears waypoints to fairy souls (/neusouls clear)" + ) + @ConfigEditorButton( + runnableId = 16, + buttonText = "Clear" + ) + @ConfigAccordionId(id = 0) + public boolean fariySoulClear = false; + + @Expose + @ConfigOption( + name = "Unclear Fairy Souls", + desc = "Shows all waypoints to fairy souls (/neusouls unclear)" + ) + @ConfigEditorButton( + runnableId = 17, + buttonText = "Unclear" + ) + @ConfigAccordionId(id = 0) + public boolean fariySoulUnclear = false; + @Expose @ConfigOption( name = "GUI Click Sounds", @@ -39,25 +78,37 @@ public class Misc { @Expose @ConfigOption( name = "Replace Chat Social Options", - desc = "Replace Hypixel's chat social options with NEU's profile viewer." + desc = "Replace Hypixel's chat social options with NEU's profile viewer or with /ah" ) - @ConfigEditorBoolean - public boolean replaceSocialOptions = true; + @ConfigEditorDropdown( + values = {"Off", "/pv", "/ah"} + ) + public int replaceSocialOptions1 = 1; @Expose @ConfigOption( name = "Damage Indicator Style", - desc = "Change the style of Skyblock damage indicators to be easier to read" + desc = "Change the style of Skyblock damage indicators to be easier to read\n" + + "\u00A7cSome old animations mods break this feature" ) @ConfigEditorDropdown( values = {"Off", "Commas", "Shortened"} ) public int damageIndicatorStyle = 1; + @Expose + @ConfigOption( + name = "Profile Viewer", + desc = "Brings up the profile viewer (/pv)\n" + + "Shows stats and networth of players" + ) + @ConfigEditorButton(runnableId = 13, buttonText = "Open") + public boolean openPV = true; + @Expose @ConfigOption( name = "Edit Enchant Colours", - desc = "Change the colours of certain skyblock enchants" + desc = "Change the colours of certain skyblock enchants (/neuec)" ) @ConfigEditorButton(runnableId = 8, buttonText = "Open") public boolean editEnchantColoursButton = true; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SkillOverlays.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SkillOverlays.java index ba83fc0c..0ba273ef 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SkillOverlays.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SkillOverlays.java @@ -3,25 +3,52 @@ package io.github.moulberry.notenoughupdates.options.seperateSections; import com.google.gson.annotations.Expose; import io.github.moulberry.notenoughupdates.core.config.Position; import io.github.moulberry.notenoughupdates.core.config.annotations.*; +import org.lwjgl.input.Keyboard; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class SkillOverlays { + @ConfigOption( + name = "Skill Overlay Info", + desc = "" + ) + @ConfigEditorAccordion(id = 2) + public boolean infoAccordion = false; + @Expose + @ConfigOption( + name = "Skill display info", + desc = "The skill trackers need you to have an \u00A72api key\u00A77 set (if you dont have one set do \u00A72/api new\u00A77)\n" + + "For the overlays to show you need a \u00A7bmathematical hoe\u00A77 or an axe with \u00A7bcultivating\u00A77 " + + "enchant for farming, a pickaxe with \u00A7bcompact\u00A77 for mining or a rod with \u00A7bexpertise\u00A77" + ) + @ConfigEditorFSR( + runnableId = 12, + buttonText = "" + ) + @ConfigAccordionId(id = 2) + public boolean skillInfo = false; + @ConfigOption( + name = "Farming", + desc = "" + ) + @ConfigEditorAccordion(id = 0) + public boolean farmingAccordion = false; @Expose @ConfigOption( name = "Enable Farming Overlay", desc = "Show an overlay while farming with useful information" ) @ConfigEditorBoolean + @ConfigAccordionId(id = 0) public boolean farmingOverlay = true; @Expose @ConfigOption( name = "Farming Text", desc = "\u00a7eDrag text to change the appearance of the overlay\n" + - "\u00a7rHold a mathematical hoe or use an axe while gaining farming xp to show the overlay" + "\u00a7rHold a mathematical hoe or use an axe with cultivating enchantment while gaining farming xp to show the overlay" ) @ConfigEditorDraggableList( exampleText = {"\u00a7bCounter: \u00a7e37,547,860", @@ -31,9 +58,13 @@ public class SkillOverlays { "\u00a7bRemaining XP: \u00a7e3,265", "\u00a7bXP/h: \u00a7e238,129", "\u00a7bYaw: \u00a7e68.25\u00a7l\u1D52", - "\u00a7bETA: 13h12m"} + "\u00a7bETA: \u00a7e13h12m", + "\u00a7bPitch: \u00a7e69.42\u00a7l\u1D52", + "\u00a7bCultivating: \u00a7e10,137,945/20,000,000", + "\u00a7bCoins/m \u00a7e57,432"} ) - public List farmingText = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 7, 6)); + @ConfigAccordionId(id = 0) + public List farmingText = new ArrayList<>(Arrays.asList(0, 9, 10, 1, 2, 3, 4, 5, 7, 6)); @Expose @ConfigOption( @@ -44,6 +75,7 @@ public class SkillOverlays { runnableId = 3, buttonText = "Edit" ) + @ConfigAccordionId(id = 0) public Position farmingPosition = new Position(10, 200); @Expose @@ -54,5 +86,145 @@ public class SkillOverlays { @ConfigEditorDropdown( values = {"Background", "No Shadow", "Shadow", "Full Shadow"} ) + @ConfigAccordionId(id = 0) public int farmingStyle = 0; + @ConfigOption( + name = "Mining", + desc = "" + ) + @ConfigEditorAccordion(id = 1) + public boolean miningAccordion = false; + @Expose + @ConfigOption( + name = "Enable Mining Overlay", + desc = "Show an overlay while Mining with useful information" + ) + @ConfigEditorBoolean + @ConfigAccordionId(id = 1) + public boolean miningSkillOverlay = true; + + @Expose + @ConfigOption( + name = "Mining Text", + desc = "\u00a7eDrag text to change the appearance of the overlay\n" + + "\u00a7rHold a pickaxe with compact while gaining mining xp to show the overlay" + ) + @ConfigEditorDraggableList( + exampleText = {"\u00a7bCompact: \u00a7e547,860", + "\u00a7bBlocks/m: \u00a7e38.29", + "\u00a7bMine: \u00a7e12\u00a77 [\u00a7e|||||||||||||||||\u00a78||||||||\u00a77] \u00a7e67%", + "\u00a7bCurrent XP: \u00a7e6,734", + "\u00a7bRemaining XP: \u00a7e3,265", + "\u00a7bXP/h: \u00a7e238,129", + "\u00a7bYaw: \u00a7e68.25\u00a7l\u1D52", + "\u00a7bETA: \u00a7e13h12m", + "\u00a7bCompact Progress: \u00a7e137,945/150,000"} + ) + @ConfigAccordionId(id = 1) + public List miningText = new ArrayList<>(Arrays.asList(0, 8, 1, 2, 3, 4, 5, 7)); + + @Expose + @ConfigOption( + name = "Mining Position", + desc = "Change the position of the Mining overlay" + ) + @ConfigEditorButton( + runnableId = 11, + buttonText = "Edit" + ) + @ConfigAccordionId(id = 1) + public Position miningPosition = new Position(10, 200); + + @Expose + @ConfigOption( + name = "Mining Style", + desc = "Change the style of the Mining overlay" + ) + @ConfigEditorDropdown( + values = {"Background", "No Shadow", "Shadow", "Full Shadow"} + ) + @ConfigAccordionId(id = 1) + public int miningStyle = 0; + + @ConfigOption( + name = "Fishing", + desc = "" + ) + @ConfigEditorAccordion(id = 3) + public boolean fishingAccordion = false; + @Expose + @ConfigOption( + name = "Enable Fishing Overlay", + desc = "Show an overlay while Fishing with useful information" + ) + @ConfigEditorBoolean + @ConfigAccordionId(id = 3) + public boolean FishingSkillOverlay = true; + + @Expose + @ConfigOption( + name = "Fishing Text", + desc = "\u00a7eDrag text to change the appearance of the overlay\n" + + "\u00a7rHold a fishing rod with expertise enchantment while gaining fishing xp to show the overlay" + ) + @ConfigEditorDraggableList( + exampleText = {"\u00a7bExpertise: \u00a7e7,945/10,000", + //"\u00a7bCatches/m: \u00a7e38.29", + "\u00a7bFishing: \u00a7e12\u00a77 [\u00a7e|||||||||||||||||\u00a78||||||||\u00a77] \u00a7e67%", + "\u00a7bCurrent XP: \u00a7e6,734", + "\u00a7bRemaining XP: \u00a7e3,265", + "\u00a7bXP/h: \u00a7e238,129", + //"\u00a7bYaw: \u00a7e68.25\u00a7l\u1D52", + "\u00a7bETA: \u00a7e13h12m", + //"\u00a7bExpertise Progress: \u00a7e7,945/10,000", + "\u00a7bTimer: \u00a7e1m15s"} + ) + @ConfigAccordionId(id = 3) + public List fishingText = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6)); + + @Expose + @ConfigOption( + name = "Fishing Position", + desc = "Change the position of the Fishing overlay" + ) + @ConfigEditorButton( + runnableId = 14, + buttonText = "Edit" + ) + @ConfigAccordionId(id = 3) + public Position fishingPosition = new Position(10, 200); + + @Expose + @ConfigOption( + name = "Fishing Style", + desc = "Change the style of the Fishing overlay" + ) + @ConfigEditorDropdown( + values = {"Background", "No Shadow", "Shadow", "Full Shadow"} + ) + @ConfigAccordionId(id = 3) + public int fishingStyle = 0; + + @Expose + @ConfigOption( + name = "Toggle Fishing timer", + desc = "Start or stop the timer on the fishing overlay\n" + + "Also can plays a ding customizable below" + ) + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_END) + @ConfigAccordionId(id = 3) + public int fishKey = Keyboard.KEY_END; + + @Expose + @ConfigOption( + name = "Fishing Timer Alert", + desc = "Change the amount of time (seconds) until the timer dings" + ) + @ConfigEditorSlider( + minValue = 0, + maxValue = 600, + minStep = 20 + ) + @ConfigAccordionId(id = 3) + public int customFishTimer = 300; } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/StorageGUI.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/StorageGUI.java index a5b5c2fa..5ec4f9ae 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/StorageGUI.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/StorageGUI.java @@ -14,7 +14,17 @@ public class StorageGUI { @Expose public int selectedIndex = 0; - + @ConfigOption( + name = "\u00A7cWarning", + desc = "You need Fast Render and Antialiasing off for these settings to work\n" + + "You can find these in your video settings" + ) + @ConfigEditorFSR( + runnableId = 12, + buttonText = "" + ) + @ConfigAccordionId(id = 1) + public boolean storageGUIWarning = false; @Expose @ConfigOption( name = "Enable Storage GUI", @@ -96,6 +106,15 @@ public class StorageGUI { @ConfigAccordionId(id = 1) public boolean searchBarAutofocus = true; + @Expose + @ConfigOption( + name = "Show Enchant Glint", + desc = "Toggle enchant glint in storage GUI" + ) + @ConfigEditorBoolean + @ConfigAccordionId(id = 1) + public boolean showEnchantGlint = true; + @Expose @ConfigOption( name = "Selected Storage Colour", 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 d8ddcbc9..fb1025f4 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java @@ -202,7 +202,34 @@ public class AuctionSearchOverlay { } + private static final ExecutorService searchES = Executors.newSingleThreadExecutor(); + private static final AtomicInteger searchId = new AtomicInteger(0); + + private static String getItemIdAtIndex(int i) { + if (!autocompletedItems.isEmpty()) { + if ((i > autocompletedItems.size() - 1) || i < 0 || i > 4) { + return ""; + } + String searchString = autocompletedItems.toArray()[i].toString(); + JsonObject repoObject = NotEnoughUpdates.INSTANCE.manager.getItemInformation().get(searchString); + String displayname = repoObject.get("displayname").getAsString(); + if (displayname.contains("Enchanted Book")) { + String lore = repoObject.get("lore").getAsJsonArray().get(0).getAsString(); + String name = lore.substring(0, lore.lastIndexOf(" ")); + return Utils.cleanColour(name); + } else { + return Utils.cleanColour(displayname); + } + } else { + return null; + } + } + public static void close() { + if (tabCompleted) { + tabCompletionIndex = -1; + tabCompleted = false; + } if (NotEnoughUpdates.INSTANCE.config.ahTweaks.keepPreviousSearch) { search(); } else { @@ -277,27 +304,44 @@ public class AuctionSearchOverlay { } } - private static final ExecutorService searchES = Executors.newSingleThreadExecutor(); - private static final AtomicInteger searchId = new AtomicInteger(0); - - private static String getItemIdAtIndex(int i) { - if (!autocompletedItems.isEmpty()) { - if ((i > autocompletedItems.size() - 1) || i < 0 || i > 4) { - return ""; + private static boolean updateTabCompletedSearch(int key) { + String id; + if (key == Keyboard.KEY_DOWN || key == Keyboard.KEY_TAB) { + id = getItemIdAtIndex(tabCompletionIndex + 1); + if (id == null) { + textField.setFocus(true); + textField.setText(searchString); + tabCompleted = false; + tabCompletionIndex = -1; + return true; + } else if (id.equals("")) { + tabCompletionIndex = 0; + return true; + } else { + searchString = id; + tabCompletionIndex += 1; + return true; } - String searchString = autocompletedItems.toArray()[i].toString(); - JsonObject repoObject = NotEnoughUpdates.INSTANCE.manager.getItemInformation().get(searchString); - String displayname = repoObject.get("displayname").getAsString(); - if (displayname.contains("Enchanted Book")) { - String lore = repoObject.get("lore").getAsJsonArray().get(0).getAsString(); - String name = lore.substring(0, lore.lastIndexOf(" ")); - return Utils.cleanColour(name); + } else if (key == Keyboard.KEY_UP) { + id = getItemIdAtIndex(tabCompletionIndex - 1); + if (id == null) { + textField.setFocus(true); + textField.setText(searchString); + tabCompleted = false; + tabCompletionIndex = -1; + return true; + } else if (id.equals("")) { + if (autocompletedItems.size() > 4) tabCompletionIndex = 4; + else tabCompletionIndex = autocompletedItems.size() - 1; + tabCompletionIndex = autocompletedItems.size() - 1; + return true; } else { - return Utils.cleanColour(displayname); + searchString = id; + tabCompletionIndex -= 1; + return true; } - } else { - return null; } + return false; } public static void search() { @@ -352,67 +396,47 @@ public class AuctionSearchOverlay { } public static void keyEvent() { + boolean ignoreKey = false; + if (Keyboard.getEventKey() == Keyboard.KEY_ESCAPE) { searchStringExtra = ""; close(); if (NotEnoughUpdates.INSTANCE.config.ahTweaks.escFullClose) { Minecraft.getMinecraft().thePlayer.sendQueue.addToSendQueue(new C0DPacketCloseWindow(Minecraft.getMinecraft().thePlayer.openContainer.windowId)); } + return; } else if (Keyboard.getEventKey() == Keyboard.KEY_RETURN) { searchStringExtra = ""; close(); + return; } else if (Keyb