From 0757e5f0b482b8849b4b13338fd25e8d9755353f Mon Sep 17 00:00:00 2001 From: DoKM Date: Wed, 15 Sep 2021 21:11:02 +0200 Subject: Add SecondPfirsisch's cape --- .../notenoughupdates/cosmetics/CapeManager.java | 2 ++ .../assets/notenoughupdates/capes/secondpfirsisch.png | Bin 0 -> 58167 bytes .../notenoughupdates/capes/secondpfirsisch_preview.png | Bin 0 -> 38433 bytes 3 files changed, 2 insertions(+) create mode 100644 src/main/resources/assets/notenoughupdates/capes/secondpfirsisch.png create mode 100644 src/main/resources/assets/notenoughupdates/capes/secondpfirsisch_preview.png 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 75a63644..68422f87 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java @@ -76,6 +76,8 @@ public class CapeManager { new CapeData("zera", false, true), new CapeData("soldier", false, true), new CapeData("alexxoffi", false, true), + new CapeData("secondpfirsisch", false, true), + //Patreon new CapeData("patreon1", false, false), diff --git a/src/main/resources/assets/notenoughupdates/capes/secondpfirsisch.png b/src/main/resources/assets/notenoughupdates/capes/secondpfirsisch.png new file mode 100644 index 00000000..66314629 Binary files /dev/null and b/src/main/resources/assets/notenoughupdates/capes/secondpfirsisch.png differ diff --git a/src/main/resources/assets/notenoughupdates/capes/secondpfirsisch_preview.png b/src/main/resources/assets/notenoughupdates/capes/secondpfirsisch_preview.png new file mode 100644 index 00000000..2be61fee Binary files /dev/null and b/src/main/resources/assets/notenoughupdates/capes/secondpfirsisch_preview.png differ -- cgit From 2805a0f401e4276403151077e79b3b6df2f892ca Mon Sep 17 00:00:00 2001 From: DoKM Date: Fri, 17 Sep 2021 18:36:40 +0200 Subject: Fix not being able to press repeat keys in chat --- .../io/github/moulberry/notenoughupdates/NEUEventListener.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java index 716c62c1..e18571c5 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java @@ -19,10 +19,7 @@ import io.github.moulberry.notenoughupdates.overlays.*; import io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer; import io.github.moulberry.notenoughupdates.util.*; 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.gui.ScaledResolution; +import net.minecraft.client.gui.*; import net.minecraft.client.gui.inventory.GuiChest; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.gui.inventory.GuiEditSign; @@ -206,7 +203,9 @@ public class NEUEventListener { @SubscribeEvent public void onTick(TickEvent.ClientTickEvent event) { - Keyboard.enableRepeatEvents(false); + if(Minecraft.getMinecraft().currentScreen == null || !(Minecraft.getMinecraft().currentScreen instanceof GuiChat)) { + Keyboard.enableRepeatEvents(false); + } if(event.phase != TickEvent.Phase.START) return; if(Minecraft.getMinecraft().theWorld == null) return; if(Minecraft.getMinecraft().thePlayer == null) return; -- cgit From 09a766bf5af91cb1842327adcc1894bb81c71054 Mon Sep 17 00:00:00 2001 From: DoKM Date: Sun, 19 Sep 2021 18:19:27 +0200 Subject: Add Stormy_LH cape --- .../notenoughupdates/cosmetics/CapeManager.java | 1 + .../assets/notenoughupdates/capes/stormy_lh.png | Bin 0 -> 56764 bytes .../assets/notenoughupdates/capes/stormy_lh_preview.png | Bin 0 -> 12899 bytes 3 files changed, 1 insertion(+) create mode 100644 src/main/resources/assets/notenoughupdates/capes/stormy_lh.png create mode 100644 src/main/resources/assets/notenoughupdates/capes/stormy_lh_preview.png 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 68422f87..cb5bd1e8 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java @@ -77,6 +77,7 @@ public class CapeManager { new CapeData("soldier", false, true), new CapeData("alexxoffi", false, true), new CapeData("secondpfirsisch", false, true), + new CapeData("stormy_lh", false, true), //Patreon diff --git a/src/main/resources/assets/notenoughupdates/capes/stormy_lh.png b/src/main/resources/assets/notenoughupdates/capes/stormy_lh.png new file mode 100644 index 00000000..aba13112 Binary files /dev/null and b/src/main/resources/assets/notenoughupdates/capes/stormy_lh.png differ diff --git a/src/main/resources/assets/notenoughupdates/capes/stormy_lh_preview.png b/src/main/resources/assets/notenoughupdates/capes/stormy_lh_preview.png new file mode 100644 index 00000000..6a9b43d0 Binary files /dev/null and b/src/main/resources/assets/notenoughupdates/capes/stormy_lh_preview.png differ -- cgit From 2131cedf60e9dfcc5016141af8c936d3f627900c Mon Sep 17 00:00:00 2001 From: DoKM Date: Sun, 19 Sep 2021 18:27:05 +0200 Subject: reorder the capes to from special to most wide spread --- .../notenoughupdates/cosmetics/CapeManager.java | 80 +++++++++++----------- 1 file changed, 41 insertions(+), 39 deletions(-) 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 cb5bd1e8..66fb5637 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java @@ -67,50 +67,52 @@ public class CapeManager { } public CapeData[] capes = new CapeData[]{ - //Content Creator - new CapeData("jakethybro", false, true), - new CapeData("krusty", false, true), - new CapeData("krusty_day", false, true), - new CapeData("krusty_sunset", false, true), - new CapeData("krusty_night", false, true), - new CapeData("zera", false, true), - new CapeData("soldier", false, true), - 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), //Admins - new CapeData("nullzee", true, false), - new CapeData("ironmoon", true, false), - new CapeData("gravy", true, false), + new CapeData("nullzee", true, false), + new CapeData("ironmoon", true, false), + new CapeData("gravy", true, false), + + //Special Other + new CapeData("contrib", true, false), + new CapeData("mbstaff", true, false), //Partner - new CapeData("thebakery", true, false), - new CapeData("furf", true, false), - new CapeData("dsm", true, false), - new CapeData("skyclient", true, false), - new CapeData("subreddit_dark", true, false), - new CapeData("subreddit_light", true, false), - new CapeData("packshq", true, false), - new CapeData("skytils", true, false), - new CapeData("sbp", true, false), + new CapeData("thebakery", true, false), + new CapeData("furf", true, false), + new CapeData("dsm", true, false), + new CapeData("skyclient", true, false), + new CapeData("subreddit_dark", true, false), + new CapeData("subreddit_light", true, false), + new CapeData("packshq", true, false), + new CapeData("skytils", true, false), + new CapeData("sbp", true, false), + + //Content Creator + new CapeData("jakethybro", false, true), + new CapeData("krusty", false, true), + new CapeData("krusty_day", false, true), + new CapeData("krusty_sunset", false, true), + new CapeData("krusty_night", false, true), + new CapeData("zera", false, true), + new CapeData("soldier", false, true), + 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) + - //Special Other - new CapeData("contrib", true, false), - new CapeData("mbstaff", true, false) }; /*private String[] capes = new String[]{"patreon1", "patreon2", "fade", "contrib", "nullzee", -- cgit From 54749d3855cfa5202e5d15363b44c7f4f121c4cf Mon Sep 17 00:00:00 2001 From: DoKM Date: Sun, 19 Sep 2021 23:05:05 +0200 Subject: Change neu's crit commas to represent hypixel's crits --- .../moulberry/notenoughupdates/miscfeatures/DamageCommas.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 a73320fc..aafcfb4d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java @@ -18,7 +18,7 @@ public class DamageCommas { private static final WeakHashMap replacementMap = new WeakHashMap<>(); - private static final EnumChatFormatting[] colours = {EnumChatFormatting.RED, EnumChatFormatting.GOLD, EnumChatFormatting.YELLOW, EnumChatFormatting.WHITE}; + private static final EnumChatFormatting[] coloursHypixel = {EnumChatFormatting.WHITE, EnumChatFormatting.YELLOW, EnumChatFormatting.GOLD, EnumChatFormatting.RED, EnumChatFormatting.RED, EnumChatFormatting.WHITE}; private static final char STAR = '\u2727'; private static final Pattern PATTERN_CRIT = Pattern.compile("\u00a7f"+STAR+"((?:\u00a7.\\d)+)\u00a7."+STAR+"(.*)"); @@ -81,7 +81,11 @@ public class DamageCommas { int colourIndex = 0; for(char c : newFormatted.toString().toCharArray()) { - newFormattedCrit.append(colours[colourIndex++ % colours.length]); + if(c == ',') { + newFormattedCrit.append(EnumChatFormatting.GRAY); + } else { + newFormattedCrit.append(coloursHypixel[colourIndex++ % coloursHypixel.length]); + } newFormattedCrit.append(c); } -- cgit From 578cf3d6e3ac9cfa62e8ac9b2fc9a630f7951609 Mon Sep 17 00:00:00 2001 From: DoKM Date: Mon, 20 Sep 2021 21:30:24 +0200 Subject: Fix gemstone gauntlet/Divan Drill not being recognised as mining tools --- .../github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java | 4 ++++ 1 file changed, 4 insertions(+) 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 e18c28be..7a37c0ce 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java @@ -123,6 +123,10 @@ public class ItemCooldowns { if(lastChar >= '0' && lastChar <= '9') { return true; } + } else if(internalname.equals("DIVAN_DRILL")){ + return true; + } else if(internalname.equals("GEMSTONE_GAUNTLET")){ + return true; } return false; } -- cgit From 75f6f7ba851fb0f7645da41c26b9c0eb2286512b Mon Sep 17 00:00:00 2001 From: DoKM <54663875+DoKM@users.noreply.github.com> Date: Tue, 21 Sep 2021 13:45:00 +0200 Subject: Fix morph pets not working --- .../java/io/github/moulberry/notenoughupdates/NEUEventListener.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java index e18571c5..212bb8a4 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java @@ -2405,7 +2405,7 @@ public class NEUEventListener { } //7 is just a random number i chose, prob no pets with less lines than 7 if (event.toolTip.size() > 7) { - if (Utils.cleanColour(event.toolTip.get(1)).matches("((Farming)|(Combat)|(Fishing)|(Mining)|(Foraging)|(Enchanting)|(Alchemy)) ((Mount)|(Pet)|(Morph)).*")) { + if (Utils.cleanColour(event.toolTip.get(1)).matches(petToolTipRegex)) { GuiProfileViewer.PetLevel petlevel = null; @@ -2441,12 +2441,14 @@ public class NEUEventListener { } return tooltipText; } + + private static final String petToolTipRegex = "((Farming)|(Combat)|(Fishing)|(Mining)|(Foraging)|(Enchanting)|(Alchemy)) ((Mount)|(Pet)|(Morph)).*"; private void petToolTipXPExtendPetMenu(ItemTooltipEvent event) { if (NotEnoughUpdates.INSTANCE.config.tooltipTweaks.petExtendExp) { //7 is just a random number i chose, prob no pets with less lines than 7 if (event.toolTip.size() > 7) { - if (Utils.cleanColour(event.toolTip.get(1)).matches("((Farming)|(Combat)|(Fishing)|(Mining)|(Foraging)|(Enchanting)|(Alchemy)) ((Mount)|(Pet)).*")) { + if (Utils.cleanColour(event.toolTip.get(1)).matches(petToolTipRegex)) { GuiProfileViewer.PetLevel petlevel = null; int xpLine = -1; -- cgit From cf875e94e8eb0b827e1a7b6c8e24c3f562db3c0c Mon Sep 17 00:00:00 2001 From: DoKM Date: Tue, 21 Sep 2021 22:01:25 +0200 Subject: Add support for the new arrows in neu pv --- .../notenoughupdates/profileviewer/GuiProfileViewer.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 c5bfc057..a2f78e22 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java @@ -1910,14 +1910,15 @@ public class GuiProfileViewer extends GuiScreen { } - public int countItemsInInventory(String internalname, JsonObject inventoryInfo, String... invsToSearch) { + public int countItemsInInventory(String internalname, JsonObject inventoryInfo, boolean specific, String... invsToSearch) { int count = 0; for(String inv : invsToSearch) { JsonArray invItems = inventoryInfo.get(inv).getAsJsonArray(); for(int i=0; i