From a60641e46300fd90799ce9178676b89c5f2353f4 Mon Sep 17 00:00:00 2001 From: DoKM Date: Fri, 23 Jul 2021 12:17:50 +0200 Subject: fix fishing helper ! not showing if rodcolours are off --- .../io/github/moulberry/notenoughupdates/mixins/MixinRenderFish.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/io') 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 ee4f4cba..a5e34cd6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderFish.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderFish.java @@ -41,8 +41,8 @@ public abstract class MixinRenderFish extends Render { return; } - if(!(NotEnoughUpdates.INSTANCE.config.fishing.enableRodColours || - FishingHelper.getInstance().warningState != FishingHelper.PlayerWarningState.NOTHING) || entity == null) return; + if((!NotEnoughUpdates.INSTANCE.config.fishing.enableRodColours && + FishingHelper.getInstance().warningState == FishingHelper.PlayerWarningState.NOTHING) || entity == null) return; String internalname = NotEnoughUpdates.INSTANCE.manager.getInternalNameForItem(entity.angler.getHeldItem()); if (NotEnoughUpdates.INSTANCE.isOnSkyblock() && internalname != null && entity.angler != null && -- cgit From b19c711aadd8b6e41b52226c4f43d7689b9cfaa4 Mon Sep 17 00:00:00 2001 From: DoKM Date: Fri, 23 Jul 2021 14:42:53 +0200 Subject: Fix decimals not getting counted on accessory bag + Support for ferocity, magic find, mining speed and mining fortune --- .../miscgui/AccessoryBagOverlay.java | 55 ++++++++++++++-------- .../profileviewer/PlayerStats.java | 4 +- 2 files changed, 38 insertions(+), 21 deletions(-) (limited to 'src/main/java/io') 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 3ad83f1a..b2d301a6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java @@ -746,15 +746,19 @@ public class AccessoryBagOverlay { } }*/ - private static final Pattern HEALTH_PATTERN_BONUS = Pattern.compile("^Health: (?:\\+|-)[0-9]+ HP \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); - private static final Pattern DEFENCE_PATTERN_BONUS = Pattern.compile("^Defense: (?:\\+|-)[0-9]+ \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); - private static final Pattern STRENGTH_PATTERN_BONUS = Pattern.compile("^Strength: (?:\\+|-)[0-9]+ \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); - private static final Pattern SPEED_PATTERN_BONUS = Pattern.compile("^Speed: (?:\\+|-)[0-9]+ \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); - private static final Pattern CC_PATTERN_BONUS = Pattern.compile("^Crit Chance: (?:\\+|-)[0-9]+% \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); - private static final Pattern CD_PATTERN_BONUS = Pattern.compile("^Crit Damage: (?:\\+|-)[0-9]+% \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); - private static final Pattern ATKSPEED_PATTERN_BONUS = Pattern.compile("^Bonus Attack Speed: (?:\\+|-)[0-9]+% \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); - private static final Pattern INTELLIGENCE_PATTERN_BONUS = Pattern.compile("^Intelligence: (?:\\+|-)[0-9]+ \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); - private static final Pattern SCC_PATTERN_BONUS = Pattern.compile("^Sea Creature Chance: (?:\\+|-)[0-9]+ \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); + private static final Pattern HEALTH_PATTERN_BONUS = Pattern.compile("^Health: (?:\\+|-)[0-9]+(?:\\.[0-9]+)? \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); + private static final Pattern DEFENCE_PATTERN_BONUS = Pattern.compile("^Defense: (?:\\+|-)[0-9]+(?:\\.[0-9]+)? \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); + private static final Pattern STRENGTH_PATTERN_BONUS = Pattern.compile("^Strength: (?:\\+|-)[0-9]+(?:\\.[0-9]+)? \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); + private static final Pattern SPEED_PATTERN_BONUS = Pattern.compile("^Speed: (?:\\+|-)[0-9]+(?:\\.[0-9]+)? \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); + private static final Pattern CC_PATTERN_BONUS = Pattern.compile("^Crit Chance: (?:\\+|-)[0-9]+(?:\\.[0-9]+)? \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); + private static final Pattern CD_PATTERN_BONUS = Pattern.compile("^Crit Damage: (?:\\+|-)[0-9]+(?:\\.[0-9]+)? \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); + private static final Pattern ATKSPEED_PATTERN_BONUS = Pattern.compile("^Bonus Attack Speed: (?:\\+|-)[0-9]+(?:\\.[0-9]+)? \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); + private static final Pattern INTELLIGENCE_PATTERN_BONUS = Pattern.compile("^Intelligence: (?:\\+|-)[0-9]+(?:\\.[0-9]+)? \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); + private static final Pattern SCC_PATTERN_BONUS = Pattern.compile("^Sea Creature Chance: (?:\\+|-)[0-9]+(?:\\.[0-9]+)? \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); + private static final Pattern FEROCITY_PATTERN_BONUS = Pattern.compile("^Ferocity: (?:\\+|-)[0-9]+(?:\\.[0-9]+)? \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); + private static final Pattern MINING_FORTUNE_PATTERN_BONUS = Pattern.compile("^Mining Fortune: (?:\\+|-)[0-9]+(?:\\.[0-9]+)? \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); + private static final Pattern MINING_SPEED_PATTERN_BONUS = Pattern.compile("^Mining Speed: (?:\\+|-)[0-9]+(?:\\.[0-9]+)? \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); + private static final Pattern MAGIC_FIND_PATTERN_BONUS = Pattern.compile("^Magic Find: (?:\\+|-)[0-9]+(?:\\.[0-9]+)? \\([a-zA-Z]+ ((?:\\+|-)[0-9]+)"); private static final HashMap STAT_PATTERN_MAP_BONUS = new HashMap<>(); static { STAT_PATTERN_MAP_BONUS.put("health", HEALTH_PATTERN_BONUS); @@ -766,17 +770,26 @@ public class AccessoryBagOverlay { 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 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 HEALTH_PATTERN = Pattern.compile("^Health: ((?:\\+|-)([0-9]+(\\.[0-9]+)?))"); + private static final Pattern DEFENCE_PATTERN = Pattern.compile("^Defense: ((?:\\+|-)([0-9]+(\\.[0-9]+)?))"); + private static final Pattern STRENGTH_PATTERN = Pattern.compile("^Strength: ((?:\\+|-)([0-9]+(\\.[0-9]+)?))"); + private static final Pattern SPEED_PATTERN = Pattern.compile("^Speed: ((?:\\+|-)([0-9]+(\\.[0-9]+)?))"); + private static final Pattern CC_PATTERN = Pattern.compile("^Crit Chance: ((?:\\+|-)([0-9]+(\\.[0-9]+)?))"); + private static final Pattern CD_PATTERN = Pattern.compile("^Crit Damage: ((?:\\+|-)([0-9]+(\\.[0-9]+)?))"); + private static final Pattern ATKSPEED_PATTERN = Pattern.compile("^Bonus Attack Speed: ((?:\\+|-)([0-9]+(\\.[0-9]+)?))"); + private static final Pattern INTELLIGENCE_PATTERN = Pattern.compile("^Intelligence: ((?:\\+|-)([0-9]+(\\.[0-9]+)?))"); + private static final Pattern SCC_PATTERN = Pattern.compile("^Sea Creature Chance: ((?:\\+|-)([0-9]+(\\.[0-9]+)?))"); + private static final Pattern FEROCITY_PATTERN = Pattern.compile("^Ferocity: ((?:\\+|-)([0-9]+(\\.[0-9]+)?))"); + private static final Pattern MINING_FORTUNE_PATTERN = Pattern.compile("^Mining Fortune: ((?:\\+|-)([0-9]+(\\.[0-9]+)?))"); + private static final Pattern MINING_SPEED_PATTERN = Pattern.compile("^Mining Speed: ((?:\\+|-)([0-9]+(\\.[0-9]+)?))"); + private static final Pattern MAGIC_FIND_PATTERN = Pattern.compile("^Magic Find: ((?:\\+|-)([0-9]+(\\.[0-9]+)?))"); + private static final HashMap STAT_PATTERN_MAP = new HashMap<>(); static { STAT_PATTERN_MAP.put("health", HEALTH_PATTERN); @@ -788,6 +801,10 @@ public class AccessoryBagOverlay { 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 PlayerStats.Stats getStatForItem(ItemStack stack, HashMap patternMap, boolean addExtras) { String internalname = NotEnoughUpdates.INSTANCE.manager.getInternalNameForItem(stack); @@ -807,7 +824,7 @@ public class AccessoryBagOverlay { for(Map.Entry entry : patternMap.entrySet()) { Matcher matcher = entry.getValue().matcher(Utils.cleanColour(line)); if(matcher.find()) { - int bonus = Integer.parseInt(matcher.group(1)); + float bonus = Float.parseFloat(matcher.group(1)); stats.addStat(entry.getKey(), bonus); } } 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 09a4b459..c95fadf0 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/PlayerStats.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/PlayerStats.java @@ -30,12 +30,12 @@ public class PlayerStats { public static final String PET_LUCK = "pet_luck"; public static final String[] defaultStatNames = new String[]{"health","defence","strength","speed","crit_chance", - "crit_damage","bonus_attack_speed","intelligence","sea_creature_chance","magic_find","pet_luck","ferocity","ability_damage"}; + "crit_damage","bonus_attack_speed","intelligence","sea_creature_chance","magic_find","pet_luck","ferocity","ability_damage","mining_fortune", "mining_speed"}; public static final String[] defaultStatNamesPretty = new String[]{EnumChatFormatting.RED+"\u2764 Health",EnumChatFormatting.GREEN+"\u2748 Defence", EnumChatFormatting.RED+"\u2741 Strength",EnumChatFormatting.WHITE+"\u2726 Speed",EnumChatFormatting.BLUE+"\u2623 Crit Chance", EnumChatFormatting.BLUE+"\u2620 Crit Damage",EnumChatFormatting.YELLOW+"\u2694 Attack Speed",EnumChatFormatting.AQUA+"\u270e Intelligence", EnumChatFormatting.DARK_AQUA+"\u03b1 SC Chance",EnumChatFormatting.AQUA+"\u272f Magic Find",EnumChatFormatting.LIGHT_PURPLE+"\u2663 Pet Luck", - EnumChatFormatting.RED+"\u2AFD Ferocity",EnumChatFormatting.RED+"\u2739 Ability Damage"}; + EnumChatFormatting.RED+"\u2AFD Ferocity",EnumChatFormatting.RED+"\u2739 Ability Damage", EnumChatFormatting.GOLD+"\u2618 Mining Fortune" ,EnumChatFormatting.GOLD+"\u2E15 Mining Speed"}; public static class Stats { JsonObject statsJson = new JsonObject(); -- cgit From c8f7b7119b5ced019b02faa46136f94716516f19 Mon Sep 17 00:00:00 2001 From: DoKM Date: Fri, 23 Jul 2021 18:03:23 +0200 Subject: Introduce alot of fixes from Ironm00n's pull request not everything though missing his cape (thats not for me to do) and his version checker for PRE's --- .../notenoughupdates/NEUEventListener.java | 55 +++++++++++----------- .../moulberry/notenoughupdates/NEUManager.java | 7 +-- .../moulberry/notenoughupdates/NEUOverlay.java | 4 +- .../notenoughupdates/NotEnoughUpdates.java | 12 +++-- .../notenoughupdates/infopanes/DevInfoPane.java | 24 ++++++---- .../notenoughupdates/itemeditor/NEUItemEditor.java | 8 ++-- .../notenoughupdates/options/NEUConfig.java | 2 + .../profileviewer/GuiProfileViewer.java | 39 +++++++++++---- .../profileviewer/ProfileViewer.java | 13 ++--- 9 files changed, 103 insertions(+), 61 deletions(-) (limited to 'src/main/java/io') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java index c3cb4a73..69ecc841 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java @@ -103,6 +103,7 @@ public class NEUEventListener { String version = o.get("version").getAsString(); boolean shouldUpdate = !NotEnoughUpdates.VERSION.equalsIgnoreCase(version); + if(o.has("version_id") && o.get("version_id").isJsonPrimitive()) { int version_id = o.get("version_id").getAsInt(); shouldUpdate = version_id > NotEnoughUpdates.VERSION_ID; @@ -248,7 +249,7 @@ public class NEUEventListener { longUpdate = true; lastLongUpdate = currentTime; } - if(!neu.config.dungeons.slowDungeonBlocks) { + if(!NotEnoughUpdates.INSTANCE.config.dungeons.slowDungeonBlocks) { DungeonBlocks.tick(); } DungeonWin.tick(); @@ -287,7 +288,7 @@ public class NEUEventListener { NotEnoughUpdates.profileViewer.putNameUuid(Minecraft.getMinecraft().thePlayer.getName(), Minecraft.getMinecraft().thePlayer.getUniqueID().toString().replace("-", "")); - if(neu.config.dungeons.slowDungeonBlocks) { + if(NotEnoughUpdates.INSTANCE.config.dungeons.slowDungeonBlocks) { DungeonBlocks.tick(); } @@ -313,11 +314,11 @@ public class NEUEventListener { SBGamemodes.loadFromFile(); - if(neu.config.notifications.showUpdateMsg) { + if(NotEnoughUpdates.INSTANCE.config.notifications.showUpdateMsg) { displayUpdateMessageIfOutOfDate(); } - if(neu.config.notifications.doRamNotif) { + if(NotEnoughUpdates.INSTANCE.config.notifications.doRamNotif) { long maxMemoryMB = Runtime.getRuntime().maxMemory()/1024L/1024L; if(maxMemoryMB > 4100) { notificationDisplayMillis = System.currentTimeMillis(); @@ -331,8 +332,8 @@ public class NEUEventListener { } } - if(!neu.config.hidden.loadedModBefore) { - neu.config.hidden.loadedModBefore = true; + if(!NotEnoughUpdates.INSTANCE.config.hidden.loadedModBefore) { + NotEnoughUpdates.INSTANCE.config.hidden.loadedModBefore = true; Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("")); Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText( @@ -571,7 +572,7 @@ public class NEUEventListener { && event.gui instanceof GuiContainer) { neu.overlay.reset(); } - if(event.gui != null && neu.config.hidden.dev) { + if(event.gui != null && NotEnoughUpdates.INSTANCE.config.hidden.dev) { if(event.gui instanceof GuiChest) { GuiChest eventGui = (GuiChest) event.gui; ContainerChest cc = (ContainerChest) eventGui.inventorySlots; @@ -755,7 +756,7 @@ public class NEUEventListener { } else if(unformatted.startsWith("Your profile was changed to: ")) {//Your profile was changed to: neu.manager.setCurrentProfile(unformatted.substring("Your profile was changed to: ".length()).split(" ")[0].trim()); } else if(unformatted.startsWith("Your new API key is ")) { - neu.config.apiKey.apiKey = unformatted.substring("Your new API key is ".length()); + NotEnoughUpdates.INSTANCE.config.apiKey.apiKey = unformatted.substring("Your new API key is ".length()); Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW+ "[NEU] API Key automatically configured")); } @@ -782,7 +783,7 @@ public class NEUEventListener { } //System.out.println(e.message); if(unformatted.startsWith("Sending to server") && - neu.isOnSkyblock() && neu.config.misc.streamerMode && e.message instanceof ChatComponentText) { + neu.isOnSkyblock() && NotEnoughUpdates.INSTANCE.config.misc.streamerMode && e.message instanceof ChatComponentText) { String m = e.message.getFormattedText(); String m2 = StreamerMode.filterChat(e.message.getFormattedText()); if(!m.equals(m2)) { @@ -851,7 +852,7 @@ public class NEUEventListener { } if(hoverInv) { renderDungeonChestOverlay(event.gui); - if(neu.config.accessoryBag.enableOverlay) { + if(NotEnoughUpdates.INSTANCE.config.accessoryBag.enableOverlay) { AccessoryBagOverlay.renderOverlay(); } } @@ -1030,7 +1031,7 @@ public class NEUEventListener { if(shouldRenderOverlay(event.gui) && neu.isOnSkyblock() && !hoverInv) { renderDungeonChestOverlay(event.gui); - if(neu.config.accessoryBag.enableOverlay) { + if(NotEnoughUpdates.INSTANCE.config.accessoryBag.enableOverlay) { AccessoryBagOverlay.renderOverlay(); } } @@ -1087,9 +1088,9 @@ public class NEUEventListener { } private void renderDungeonChestOverlay(GuiScreen gui) { - if(neu.config.dungeons.profitDisplayLoc == 3) return; + if(NotEnoughUpdates.INSTANCE.config.dungeons.profitDisplayLoc == 3) return; - if(gui instanceof GuiChest && neu.config.dungeons.profitDisplayLoc != 2) { + if(gui instanceof GuiChest && NotEnoughUpdates.INSTANCE.config.dungeons.profitDisplayLoc != 2) { try { int xSize = ((GuiContainer)gui).xSize; int ySize = ((GuiContainer)gui).ySize; @@ -1136,7 +1137,7 @@ public class NEUEventListener { if(bazaarPrice > 0) { worth = bazaarPrice; } else { - switch(neu.config.dungeons.profitType) { + switch(NotEnoughUpdates.INSTANCE.config.dungeons.profitType) { case 1: worth = neu.manager.auctionManager.getItemAvgBin(internal); break; @@ -1228,7 +1229,7 @@ public class NEUEventListener { plStringBIN = prefix + "-" + format.format(-profitLossBIN) + " coins"; } - if(neu.config.dungeons.profitDisplayLoc == 1 && !valueStringBIN2.equals(missingItem)) { + if(NotEnoughUpdates.INSTANCE.config.dungeons.profitDisplayLoc == 1 && !valueStringBIN2.equals(missingItem)) { int w = Minecraft.getMinecraft().fontRendererObj.getStringWidth(plStringBIN); GlStateManager.disableLighting(); GlStateManager.translate(0, 0, 200); @@ -1350,7 +1351,7 @@ public class NEUEventListener { } if(shouldRenderOverlay(event.gui) && neu.isOnSkyblock()) { - if(!neu.config.accessoryBag.enableOverlay || !AccessoryBagOverlay.mouseClick()) { + if(!NotEnoughUpdates.INSTANCE.config.accessoryBag.enableOverlay || !AccessoryBagOverlay.mouseClick()) { if(!(hoverInv && focusInv)) { if(neu.overlay.mouseInput()) { event.setCanceled(true); @@ -1473,7 +1474,7 @@ public class NEUEventListener { event.setCanceled(true); } } - if(neu.config.hidden.dev && neu.config.hidden.enableItemEditing && Minecraft.getMinecraft().theWorld != null && + if(NotEnoughUpdates.INSTANCE.config.hidden.dev && NotEnoughUpdates.INSTANCE.config.hidden.enableItemEditing && Minecraft.getMinecraft().theWorld != null && Keyboard.getEventKey() == Keyboard.KEY_N && Keyboard.getEventKeyState()) { GuiScreen gui = Minecraft.getMinecraft().currentScreen; if(gui instanceof GuiChest) { @@ -1529,7 +1530,7 @@ public class NEUEventListener { System.out.println(essenceJson); } } - if(neu.config.hidden.dev && neu.config.hidden.enableItemEditing && Minecraft.getMinecraft().theWorld != null && + if(NotEnoughUpdates.INSTANCE.config.hidden.dev && NotEnoughUpdates.INSTANCE.config.hidden.enableItemEditing && Minecraft.getMinecraft().theWorld != null && Keyboard.getEventKey() == Keyboard.KEY_O && Keyboard.getEventKeyState()) { GuiScreen gui = Minecraft.getMinecraft().currentScreen; if(gui instanceof GuiChest) { @@ -1643,7 +1644,7 @@ public class NEUEventListener { JsonObject enchantsConst = Constants.ENCHANTS; JsonArray allItemEnchs = null; Set ignoreFromPool = new HashSet<>(); - if(enchantsConst != null && hasEnchantments && neu.config.tooltipTweaks.missingEnchantList) { + if(enchantsConst != null && hasEnchantments && NotEnoughUpdates.INSTANCE.config.tooltipTweaks.missingEnchantList) { try { JsonArray enchantPools = enchantsConst.get("enchant_pools").getAsJsonArray(); for(JsonElement element : enchantPools) { @@ -1833,7 +1834,7 @@ public class NEUEventListener { line = line.replace("\u00A7cR\u00A76a\u00A7ei\u00A7an\u00A7bb\u00A79o\u00A7dw\u00A79 Rune", Utils.chromaString("Rainbow Rune", index, false)+EnumChatFormatting.BLUE); } else if(hasEnchantments) { - if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) && neu.config.tooltipTweaks.missingEnchantList) { + if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) && NotEnoughUpdates.INSTANCE.config.tooltipTweaks.missingEnchantList) { boolean lineHasEnch = false; for(String s : enchantIds) { String enchantName = WordUtils.capitalizeFully(s.replace("_", " ")); @@ -1876,7 +1877,7 @@ public class NEUEventListener { } } } - for(String op : neu.config.hidden.enchantColours) { + for(String op : NotEnoughUpdates.INSTANCE.config.hidden.enchantColours) { List colourOps = GuiEnchantColour.splitter.splitToList(op); String enchantName = GuiEnchantColour.getColourOpIndex(colourOps, 0); String comparator = GuiEnchantColour.getColourOpIndex(colourOps, 1); @@ -2018,7 +2019,7 @@ public class NEUEventListener { newTooltip.add(line); - if(neu.config.tooltipTweaks.showPriceInfoAucItem) { + if(NotEnoughUpdates.INSTANCE.config.tooltipTweaks.showPriceInfoAucItem) { if(line.contains(EnumChatFormatting.GRAY+"Buy it now: ") || line.contains(EnumChatFormatting.GRAY+"Bidder: ") || line.contains(EnumChatFormatting.GRAY+"Starting bid: ")) { @@ -2032,7 +2033,7 @@ public class NEUEventListener { } } - if(neu.config.dungeons.profitDisplayLoc == 2 && Minecraft.getMinecraft().currentScreen instanceof GuiChest) { + if(NotEnoughUpdates.INSTANCE.config.dungeons.profitDisplayLoc == 2 && Minecraft.getMinecraft().currentScreen instanceof GuiChest) { if(line.contains(EnumChatFormatting.GREEN+"Open Reward Chest")) { dungeonProfit = true; } else if(index == 7 && dungeonProfit) { @@ -2074,7 +2075,7 @@ public class NEUEventListener { if(bazaarPrice > 0) { worth = bazaarPrice; } else { - switch(neu.config.dungeons.profitType) { + switch(NotEnoughUpdates.INSTANCE.config.dungeons.profitType) { case 1: worth = neu.manager.auctionManager.getItemAvgBin(internal); break; @@ -2199,7 +2200,7 @@ public class NEUEventListener { hypixelOrder.add("reforge_bonus"); hypixelOrder.add("rarity"); - if(neu.config.tooltipTweaks.showPriceInfoInvItem) { + if(NotEnoughUpdates.INSTANCE.config.tooltipTweaks.showPriceInfoInvItem) { ItemPriceInformation.addToTooltip(event.toolTip, internalname, event.itemStack); } } @@ -2211,7 +2212,7 @@ public class NEUEventListener { @SubscribeEvent public void onItemTooltip(ItemTooltipEvent event) { if(!neu.isOnSkyblock()) return; - if(neu.config.improvedSBMenu.hideEmptyPanes && + if(NotEnoughUpdates.INSTANCE.config.improvedSBMenu.hideEmptyPanes && event.itemStack.getItem().equals(Item.getItemFromBlock(Blocks.stained_glass_pane))) { String first = Utils.cleanColour(event.toolTip.get(0)); first = first.replaceAll("\\(.*\\)", "").trim(); @@ -2268,7 +2269,7 @@ public class NEUEventListener { } } }*/ - if(Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && neu.config.hidden.dev && + if(Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && NotEnoughUpdates.INSTANCE.config.hidden.dev && event.toolTip.size()>0&&event.toolTip.get(event.toolTip.size()-1).startsWith(EnumChatFormatting.DARK_GRAY + "NBT: ")) { event.toolTip.remove(event.toolTip.size()-1); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java index 181b9225..38925b77 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java @@ -66,7 +66,7 @@ public class NEUManager { private ExecutorService repoLoaderES = Executors.newSingleThreadExecutor(); - private static final String GIT_COMMITS_URL = "https://api.github.com/repos/Moulberry/NotEnoughUpdates-REPO/commits/master"; + private static String GIT_COMMITS_URL; private HashMap> usagesMap = new HashMap<>(); @@ -80,6 +80,7 @@ public class NEUManager { this.neu = neu; this.configLocation = configLocation; this.auctionManager = new APIManager(this); + GIT_COMMITS_URL = neu.config.hidden.repoCommitsURL; gson = new GsonBuilder().setPrettyPrinting().create(); @@ -188,8 +189,8 @@ public class NEUManager { Utils.recursiveDelete(repoLocation); repoLocation.mkdirs(); - //TODO: Store hard-coded value somewhere else - String dlUrl = "https://github.com/Moulberry/NotEnoughUpdates-REPO/archive/master.zip"; + + String dlUrl = neu.config.hidden.repoURL; pane.setMessage("Downloading NEU Master Archive. (DL# >20)"); dialog.pack(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index 2a6160f1..9e3c863c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -1044,6 +1044,7 @@ public class NEUOverlay extends Gui { 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.LIGHT_PURPLE+EnumChatFormatting.BOLD.toString()+"SPECIAL", }; @@ -1055,7 +1056,8 @@ public class NEUOverlay extends Gui { * 2 = RARE * 3 = EPIC * 4 = LEGENDARY - * 5 = SPECIAL + * 5 = MYTHIC + * 6 = SPECIAL */ public int getRarity(JsonArray lore) { for(int i=lore.size()-1; i>=0; i--) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java index cfab28e0..eb53a29a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java @@ -389,6 +389,7 @@ public class NotEnoughUpdates { float zombie = Utils.getElementAsFloat(skill.get("level_slayer_zombie"), 0); float spider = Utils.getElementAsFloat(skill.get("level_slayer_spider"), 0); float wolf = Utils.getElementAsFloat(skill.get("level_slayer_wolf"), 0); + float enderman = Utils.getElementAsFloat(skill.get("level_slayer_enderman"), 0); float avgSkillLVL = totalSkillLVL/totalSkillCount; @@ -404,11 +405,13 @@ public class NotEnoughUpdates { EnumChatFormatting zombiePrefix = zombie>3?(zombie>6?EnumChatFormatting.GREEN:EnumChatFormatting.YELLOW):EnumChatFormatting.RED; EnumChatFormatting spiderPrefix = spider>3?(spider>6?EnumChatFormatting.GREEN:EnumChatFormatting.YELLOW):EnumChatFormatting.RED; EnumChatFormatting wolfPrefix = wolf>3?(wolf>6?EnumChatFormatting.GREEN:EnumChatFormatting.YELLOW):EnumChatFormatting.RED; + EnumChatFormatting endermanPrefix = enderman>3?(enderman>6?EnumChatFormatting.GREEN:EnumChatFormatting.YELLOW):EnumChatFormatting.RED; EnumChatFormatting avgPrefix = avgSkillLVL>20?(avgSkillLVL>35?EnumChatFormatting.GREEN:EnumChatFormatting.YELLOW):EnumChatFormatting.RED; overallScore += zombie*zombie/81f; overallScore += spider*spider/81f; overallScore += wolf*wolf/81f; + overallScore += enderman*enderman/81f; overallScore += avgSkillLVL/20f; int cata = (int)Utils.getElementAsFloat(skill.get("level_skill_catacombs"), 0); @@ -422,7 +425,9 @@ public class NotEnoughUpdates { g+" - AVG: " + avgPrefix+(int)Math.floor(avgSkillLVL))); Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText( g+"Slayer: "+zombiePrefix+(int)Math.floor(zombie)+g+"-"+ - spiderPrefix+(int)Math.floor(spider)+g+"-"+wolfPrefix+(int)Math.floor(wolf))); + spiderPrefix+(int)Math.floor(spider)+g+"-"+ + wolfPrefix+(int)Math.floor(wolf)+"-"+ + endermanPrefix+(int)Math.floor(enderman))); } if(stats == null) { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText( @@ -727,11 +732,12 @@ public class NotEnoughUpdates { "\u00a7dFrom \u00a7c[ADMIN] Minikloon\u00a77: If you use that command again, I'll have to ban you", "", "Ok, this is actually the last message, use the command again and you'll crash I promise"}; private int devFailIndex = 0; + + private static final List devTestUsers = new ArrayList<>(Arrays.asList("moulberry", "lucycoconut", "ironm00n", "ariyio")); SimpleCommand devTestCommand = new SimpleCommand("neudevtest", new SimpleCommand.ProcessCommandRunnable() { @Override public void processCommand(ICommandSender sender, String[] args) { - if(!Minecraft.getMinecraft().thePlayer.getName().equalsIgnoreCase("Moulberry") && - !Minecraft.getMinecraft().thePlayer.getName().equalsIgnoreCase("LucyCoconut")) { + if(!devTestUsers.contains(Minecraft.getMinecraft().thePlayer.getName().toLowerCase())) { if(devFailIndex >= devFailStrings.length) { throw new Error("L") { @Override 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 22427cee..b33dc888 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java @@ -35,7 +35,7 @@ public class DevInfoPane extends TextInfoPane { */ public DevInfoPane(NEUOverlay overlay, NEUManager manager) { - super(overlay, manager, "Dev", ""); + super(overlay, manager, "Missing Items", ""); text = getText(); } @@ -61,7 +61,7 @@ public class DevInfoPane extends TextInfoPane { //if(true) return text; for(String internalname : manager.auctionManager.getItemAuctionInfoKeySet()) { - if(internalname.contains("-")) continue; + if (internalname.matches("^.*-[0-9]{1,3}$")) continue; if(!manager.getItemInformation().containsKey(internalname)) { text += internalname + "\n"; } @@ -464,7 +464,9 @@ public class DevInfoPane extends TextInfoPane { ItemStack stack = shaped.recipeItems[recipeIndex]; if(stack != null) { if(stack.getItem() != stackToAdd.getItem() || - (stackToAdd.getItemDamage() < 32000 && stack.getItemDamage() != stackToAdd.getItemDamage())) addStack(stack, depth+1); + (stackToAdd.getItemDamage() < 32000 && stack.getItemDamage() != stackToAdd.getItemDamage())) { + addStack(stack, depth+1); + } Item stackItem = stack.getItem(); String regName = stackItem.getRegistryName().replace("minecraft:", ""); @@ -516,7 +518,9 @@ public class DevInfoPane extends TextInfoPane { } if(stack != null) { if(stack.getItem() != stackToAdd.getItem() || - (stackToAdd.getItemDamage() < 32000 && stack.getItemDamage() != stackToAdd.getItemDamage())) addStack(stack, depth+1); + (stackToAdd.getItemDamage() < 32000 && stack.getItemDamage() != stackToAdd.getItemDamage())) { + addStack(stack, depth+1); + } Item stackItem = stack.getItem(); String regName = stackItem.getRegistryName().replace("minecraft:", ""); for(String bukkit2 : bukkitList) { @@ -554,7 +558,9 @@ public class DevInfoPane extends TextInfoPane { } if(stack != null) { if(stack.getItem() != stackToAdd.getItem() || - (stackToAdd.getItemDamage() < 32000 && stack.getItemDamage() != stackToAdd.getItemDamage())) addStack(stack, depth+1); + (stackToAdd.getItemDamage() < 32000 && stack.getItemDamage() != stackToAdd.getItemDamage())) { + addStack(stack, depth + 1); + } Item stackItem = stack.getItem(); String regName = stackItem.getRegistryName().replace("minecraft:", ""); for(String bukkit2 : bukkitList) { @@ -588,7 +594,7 @@ public class DevInfoPane extends TextInfoPane { ItemStack stack = null; if(i < shapeless.getRecipeSize()) { - Object o = shapeless.getInput().get(i);; + Object o = shapeless.getInput().get(i); if(o instanceof ItemStack) { stack = (ItemStack) o; } else if(o instanceof List) { @@ -602,7 +608,9 @@ public class DevInfoPane extends TextInfoPane { } if(stack != null) { if(stack.getItem() != stackToAdd.getItem() || - (stackToAdd.getItemDamage() < 32000 && stack.getItemDamage() != stackToAdd.getItemDamage())) addStack(stack, depth+1); + (stackToAdd.getItemDamage() < 32000 && stack.getItemDamage() != stackToAdd.getItemDamage())) { + addStack(stack, depth+1); + } Item stackItem = stack.getItem(); String regName = stackItem.getRegistryName().replace("minecraft:", ""); for(String bukkit2 : bukkitList) { @@ -829,7 +837,7 @@ public class DevInfoPane extends TextInfoPane { ItemStack stack = null; if(i < shapeless.getRecipeSize()) { - Object o = shapeless.getInput().get(i);; + Object o = shapeless.getInput().get(i); if(o instanceof ItemStack) { stack = (ItemStack) o; } else if(o instanceof List) { 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 37ffc938..2da81b94 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java @@ -116,7 +116,7 @@ public class NEUItemEditor extends GuiScreen { }.b; rightOptions.add(button); - button = new Object() { //Used to make the compiler shut the fuck up + /*button = new Object() { //Used to make the compiler shut the fuck up GuiElementButton b = new GuiElementButton("Upload", Color.YELLOW.getRGB(), new Runnable() { public void run() { if(b.getText().equals("Upload")) { @@ -131,7 +131,7 @@ public class NEUItemEditor extends GuiScreen { } }); }.b; - rightOptions.add(button); + rightOptions.add(button);*/ rightOptions.add(new GuiElementText("", Color.WHITE.getRGB())); @@ -160,7 +160,7 @@ public class NEUItemEditor extends GuiScreen { crafttext.get(), infoType.get(), infoA, clickcommand.get(), damageI, nbttag); } - public boolean upload() { + /*public boolean upload() { int damageI = 0; try { damageI = Integer.valueOf(damage.get()); @@ -172,7 +172,7 @@ public class NEUItemEditor extends GuiScreen { } return manager.uploadItemJson(internalname.get(), itemid.get(), displayname.get(), lore.get().split("\n"), crafttext.get(), infoType.get(), infoA, clickcommand.get(), damageI, nbttag); - } + }*/ public void onGuiClosed() { Keyboard.enableRepeatEvents(false); 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 58deef74..22d5e32f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java @@ -284,6 +284,8 @@ public class NEUConfig extends Config { "Life Steal:\u003e:3:5:0", "Scavenger:\u003e:3:5:0", "Looting:\u003e:3:5:0"); + @Expose public String repoURL = "https://github.com/Moulberry/NotEnoughUpdates-REPO/archive/master.zip"; + @Expose public String repoCommitsURL = "https://api.github.com/repos/Moulberry/NotEnoughUpdates-REPO/commits/master"; } private static ArrayList createDefaultQuickCommands() { 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 af4c354c..db0eac09 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java @@ -1524,13 +1524,23 @@ public class GuiProfileViewer extends GuiScreen { Utils.drawStringCentered(selectedCollectionCategory.getDisplayName() + " Minions", Minecraft.getMinecraft().fontRendererObj, guiLeft+326, guiTop+14, true, 4210752); - float MAX_MINION_TIER = 11f; + List minions = ProfileViewer.getCollectionCatToMinionMap().get(selectedCollectionCategory); if(minions != null) { for(int i=0; i= romans.length || tier-1 < 0) { tierString = String.valueOf(tier); } else { @@ -2136,7 +2146,7 @@ public class GuiProfileViewer extends GuiScreen { float xStart = 22; float xOffset = 103; float yStartTop = 27; - float yStartBottom = 109; + float yStartBottom = 105; float yOffset = 10; float bankBalance = Utils.getElementAsFloat(Utils.getElement(profileInfo, "banking.balance"), 0); @@ -2162,6 +2172,7 @@ public class GuiProfileViewer extends GuiScreen { float totalSlayerLVL = 0; float totalSkillCount = 0; float totalSlayerCount = 0; + float totalSlayerXP = 0; for(Map.Entry entry : skillInfo.entrySet()) { if(entry.getKey().startsWith("level_skill")) { @@ -2175,6 +2186,8 @@ public class GuiProfileViewer extends GuiScreen { } else if(entry.getKey().startsWith("level_slayer")) { totalSlayerLVL += entry.getValue().getAsFloat(); totalSlayerCount++; + } else if (entry.getKey().startsWith("experience_slayer")) { + totalSlayerXP += entry.getValue().getAsFloat(); } } @@ -2184,10 +2197,15 @@ public class GuiProfileViewer extends GuiScreen { Utils.renderAlignedString(EnumChatFormatting.RED+"AVG Skill Level", EnumChatFormatting.WHITE.toString()+Math.floor(avgSkillLVL*10)/10, guiLeft+xStart, guiTop+yStartBottom+yOffset, 76); - Utils.renderAlignedString(EnumChatFormatting.RED+"AVG Slayer Level", EnumChatFormatting.WHITE.toString()+Math.floor(avgSlayerLVL*10)/10, - guiLeft+xStart, guiTop+yStartBottom+yOffset*2, 76); + Utils.renderAlignedString(EnumChatFormatting.RED+"True AVG Skill Level", EnumChatFormatting.WHITE.toString()+Math.floor(avgTrueSkillLVL*10)/10, + guiLeft+xStart, guiTop+yStartBottom+yOffset*2, 76); + + Utils.renderAlignedString(EnumChatFormatting.RED+"AVG Slayer Level", EnumChatFormatting.WHITE.toString()+Math.floor(avgSlayerLVL*10)/10, guiLeft+xStart, guiTop+yStartBottom+yOffset*3, 76); + + Utils.renderAlignedString(EnumChatFormatting.RED + "Total Slayer XP", EnumChatFormatting.WHITE.toString() + Math.floor(totalSlayerXP * 10) / 10, + guiLeft + xStart, guiTop + yStartBottom + yOffset * 4, 76); } @@ -2396,7 +2414,7 @@ public class GuiProfileViewer extends GuiScreen { playerName = Utils.getElementAsString(profile.getHypixelProfile().get("prefix"), "") + " " + entityPlayer.getName(); } else { String rank = Utils.getElementAsString(profile.getHypixelProfile().get("rank"), - Utils.getElementAsString(profile.getHypixelProfile().get("newPackageRank"), "NONE"));; + Utils.getElementAsString(profile.getHypixelProfile().get("newPackageRank"), "NONE")); String monthlyPackageRank = Utils.getElementAsString(profile.getHypixelProfile().get("monthlyPackageRank"), "NONE"); if(!rank.equals("YOUTUBER") && !monthlyPackageRank.equals("NONE")) { rank = monthlyPackageRank; @@ -2478,8 +2496,10 @@ public class GuiProfileViewer extends GuiScreen { } else { tooltipToDisplay.add(EnumChatFormatting.GRAY+"[SHIFT for Info]"); } - tooltipToDisplay.add(""); - tooltipToDisplay.add(EnumChatFormatting.RED+"THIS IS IN NO WAY ENDORSING IRL TRADING!"); + if (!NotEnoughUpdates.INSTANCE.config.hidden.dev) { + tooltipToDisplay.add(""); + tooltipToDisplay.add(EnumChatFormatting.RED + "THIS IS IN NO WAY ENDORSING IRL TRADING!"); + } } } @@ -2635,6 +2655,7 @@ public class GuiProfileViewer extends GuiScreen { Splitter splitter = Splitter.on(" ").omitEmptyStrings().limit(2); for(int i=0; i skillToSkillDisplayMap = new LinkedHashMap<>(); @@ -79,12 +80,12 @@ public class ProfileViewer { 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", "MITHRIL_ORE", "HARD_STONE", "GEMSTONE_COLLECTION")); + "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")); + "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")); + 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")); @@ -99,12 +100,12 @@ public class ProfileViewer { collectionCatToMinionMap.put(CAT_MINING, Utils.createList("COBBLESTONE", "COAL", "IRON", "GOLD", "DIAMOND", "LAPIS", "EMERALD", "REDSTONE", "QUARTZ", "OBSIDIAN", "GLOWSTONE", "GRAVEL", "ICE", null, - "SAND", "ENDER_STONE", "MITHRIL", "HARD_STONE", 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")); + "GHAST", "SLIME", "BLAZE", "MAGMA_CUBE", "REVENANT", "TARANTULA", "VOIDLING")); collectionCatToMinionMap.put(CAT_FORAGING, - Utils.createList("OAK", "SPRUCE", "BIRCH", "DARK_OAK", "ACACIA", "JUNGLE")); + 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)); -- cgit From 26d0a8c99d229979ea7863927305a84d2d931ba2 Mon Sep 17 00:00:00 2001 From: DoKM Date: Sat, 24 Jul 2021 19:56:07 +0200 Subject: Drill fuelbar support for crystal hollows and Divan's drill Divan's is untested but should work --- .../java/io/github/moulberry/notenoughupdates/overlays/FuelBar.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/io') 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 aecd93d0..25148ba3 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/FuelBar.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/FuelBar.java @@ -32,7 +32,7 @@ public class FuelBar { fuelAmount = -1; if(SBInfo.getInstance().getLocation() == null) return; - if(!SBInfo.getInstance().getLocation().startsWith("mining_")) return; + if(!(SBInfo.getInstance().getLocation().startsWith("mining_")||SBInfo.getInstance().getLocation().equals("crystal_hollows"))) return; if(Minecraft.getMinecraft().thePlayer == null) return; if(!NotEnoughUpdates.INSTANCE.config.mining.drillFuelBar) return; @@ -40,7 +40,7 @@ public class FuelBar { ItemStack held = Minecraft.getMinecraft().thePlayer.getHeldItem(); if(held != null) { String internalname = NotEnoughUpdates.INSTANCE.manager.getInternalNameForItem(held); - if(internalname != null && internalname.contains("_DRILL_")) { + if(internalname != null && (internalname.contains("_DRILL_") || internalname.equals("DIVAN_DRILL"))) { String[] lore = NotEnoughUpdates.INSTANCE.manager.getLoreFromNBT(held.getTagCompound()); for(String line : lore) { try { -- cgit From 82451c9e0bd0b62cefc7e09868b463dcd4b33e5a Mon Sep 17 00:00:00 2001 From: DoKM Date: Sat, 24 Jul 2021 21:21:03 +0200 Subject: Change default todo overlay colours to something that makes more sense --- .../options/seperateSections/MiscOverlays.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/io') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java index db36b111..47fbfcc5 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java @@ -156,7 +156,7 @@ public class MiscOverlays { values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"} ) @ConfigAccordionId(id = 2) - public int readyColour = 0; + public int readyColour = 10; @Expose @ConfigOption( @@ -168,7 +168,7 @@ public class MiscOverlays { values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"} ) @ConfigAccordionId(id = 2) - public int goneColour = 0; + public int goneColour = 12; @Expose @ConfigOption( @@ -180,7 +180,7 @@ public class MiscOverlays { values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"} ) @ConfigAccordionId(id = 2) - public int verySoonColour = 0; + public int verySoonColour = 11; @Expose @ConfigOption( @@ -192,7 +192,7 @@ public class MiscOverlays { values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"} ) @ConfigAccordionId(id = 2) - public int soonColour = 0; + public int soonColour = 9; @Expose @ConfigOption( @@ -204,7 +204,7 @@ public class MiscOverlays { values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"} ) @ConfigAccordionId(id = 2) - public int kindaSoonColour = 0; + public int kindaSoonColour = 1; @Expose @@ -218,7 +218,7 @@ public class MiscOverlays { values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"} ) @ConfigAccordionId(id = 2) - public int defaultColour = 0; + public int defaultColour = 15; @Expose -- cgit From 99cea134201179080329845ba499bafe00f28351 Mon Sep 17 00:00:00 2001 From: DoKM Date: Sun, 25 Jul 2021 11:32:52 +0200 Subject: set alexxoffi's cape's properties to the right value hidden = true; --- .../io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/io') 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 1ebf9937..893a1109 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java @@ -75,7 +75,7 @@ public class CapeManager { new CapeData("krusty_night", false, true), new CapeData("zera", false, true), new CapeData("soldier", false, true), - new CapeData("alexxoffi", false, false), + new CapeData("alexxoffi", false, true), //Patreon new CapeData("patreon1", false, false), -- cgit From 7b79c6bb2f9b570c9c2c3f424f239c645dfe90d7 Mon Sep 17 00:00:00 2001 From: DoKM Date: Sun, 25 Jul 2021 14:01:53 +0200 Subject: Add extra button texture so dungeon map editor can be read with packshq idk, seems like the simpelest fix for now could switch it out to a config file that allows pack creators to choose the text colours --- .../notenoughupdates/dungeons/GuiDungeonMapEditor.java | 2 +- .../notenoughupdates/dungeon_map/editor/button.png | Bin 0 -> 2664 bytes 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 src/main/resources/assets/notenoughupdates/dungeon_map/editor/button.png (limited to 'src/main/java/io') 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 ea2631df..1a420c67 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/GuiDungeonMapEditor.java @@ -37,7 +37,7 @@ 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:button.png"); + public static final ResourceLocation BUTTON = new ResourceLocation("notenoughupdates:dungeon_map/editor/button.png"); private static final DungeonMap demoMap = new DungeonMap(); private int sizeX; diff --git a/src/main/resources/assets/notenoughupdates/dungeon_map/editor/button.png b/src/main/resources/assets/notenoughupdates/dungeon_map/editor/button.png new file mode 100644 index 00000000..e96f4284 Binary files /dev/null and b/src/main/resources/assets/notenoughupdates/dungeon_map/editor/button.png differ -- cgit