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') 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') 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') 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 faf123fb068c294caa206d792b2a725ae1fd9139 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Fri, 23 Jul 2021 15:13:24 -0400 Subject: feat: add auto updater for prereleases and allow changing the repo url --- .gitignore | 1 + build.gradle | 2 +- .../notenoughupdates/NEUEventListener.java | 52 +++++++++++++++++----- .../moulberry/notenoughupdates/NEUManager.java | 6 +-- .../notenoughupdates/NotEnoughUpdates.java | 4 +- .../notenoughupdates/infopanes/DevInfoPane.java | 4 +- .../notenoughupdates/options/NEUConfig.java | 2 + .../profileviewer/GuiProfileViewer.java | 2 +- .../notenoughupdates/util/XPInformation.java | 2 +- 9 files changed, 54 insertions(+), 21 deletions(-) (limited to 'src/main') diff --git a/.gitignore b/.gitignore index 23229b1e..e5ac9893 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ gradle.properties # other eclipse run +.vscode diff --git a/build.gradle b/build.gradle index 0c21ffa3..5d6d03cf 100644 --- a/build.gradle +++ b/build.gradle @@ -23,7 +23,7 @@ apply plugin: 'com.github.johnrengelman.shadow' sourceCompatibility = 1.8 targetCompatibility = 1.8 -version = "1.7-REL" +version = "2.0-PRE" group= "io.github.moulberry" archivesBaseName = "NotEnoughUpdates" String modid = "notenoughupdates" diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java index c3cb4a73..90065ffe 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java @@ -19,7 +19,10 @@ import io.github.moulberry.notenoughupdates.gamemodes.SBGamemodes; import io.github.moulberry.notenoughupdates.miscfeatures.*; import io.github.moulberry.notenoughupdates.miscgui.*; import io.github.moulberry.notenoughupdates.options.NEUConfig; -import io.github.moulberry.notenoughupdates.overlays.*; +import io.github.moulberry.notenoughupdates.overlays.AuctionSearchOverlay; +import io.github.moulberry.notenoughupdates.overlays.OverlayManager; +import io.github.moulberry.notenoughupdates.overlays.RancherBootOverlay; +import io.github.moulberry.notenoughupdates.overlays.TextOverlay; import io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer; import io.github.moulberry.notenoughupdates.util.*; import net.minecraft.client.Minecraft; @@ -31,10 +34,7 @@ import net.minecraft.client.gui.inventory.GuiChest; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.gui.inventory.GuiEditSign; import net.minecraft.client.gui.inventory.GuiInventory; -import net.minecraft.client.network.NetworkPlayerInfo; import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityArmorStand; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.event.ClickEvent; import net.minecraft.init.Blocks; @@ -46,14 +46,11 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTUtil; -import net.minecraft.network.play.client.C12PacketUpdateSign; import net.minecraft.util.*; import net.minecraftforge.client.ClientCommandHandler; import net.minecraftforge.client.event.*; -import net.minecraftforge.event.entity.player.EntityInteractEvent; import net.minecraftforge.event.entity.player.ItemTooltipEvent; import net.minecraftforge.event.world.WorldEvent; -import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; @@ -101,12 +98,18 @@ public class NEUEventListener { JsonObject o = neu.manager.getJsonFromFile(updateJson); String version = o.get("version").getAsString(); + String preVersion = o.get("pre_version").getAsString(); boolean shouldUpdate = !NotEnoughUpdates.VERSION.equalsIgnoreCase(version); + boolean shouldPreUpdate = !NotEnoughUpdates.PRE_VERSION.equalsIgnoreCase(preVersion); if(o.has("version_id") && o.get("version_id").isJsonPrimitive()) { int version_id = o.get("version_id").getAsInt(); shouldUpdate = version_id > NotEnoughUpdates.VERSION_ID; } + if (o.has("pre_version_id") && o.get("pre_version_id").isJsonPrimitive()) { + int pre_version_id = o.get("pre_version_id").getAsInt(); + shouldPreUpdate = pre_version_id > NotEnoughUpdates.PRE_VERSION_ID; + } if(shouldUpdate) { String update_msg = o.get("update_msg").getAsString(); @@ -132,6 +135,31 @@ public class NEUEventListener { neu.displayLinks(o); + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("")); + } else if (shouldPreUpdate && NotEnoughUpdates.VERSION.equalsIgnoreCase("2.0.0-REL")) { + String pre_update_msg = o.get("pre_update_msg").getAsString(); + + int first_len = -1; + for (String line : pre_update_msg.split("\n")) { + FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; + int len = fr.getStringWidth(line); + if (first_len == -1) { + first_len = len; + } + int missing_len = first_len - len; + if (missing_len > 0) { + StringBuilder sb = new StringBuilder(line); + for (int i = 0; i < missing_len / 8; i++) { + sb.insert(0, " "); + } + line = sb.toString(); + } + line = line.replaceAll("\\{pre_version}", preVersion); + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(line)); + } + + neu.displayLinks(o); + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("")); } } catch(Exception ignored) {} @@ -314,7 +342,7 @@ public class NEUEventListener { SBGamemodes.loadFromFile(); if(neu.config.notifications.showUpdateMsg) { - displayUpdateMessageIfOutOfDate(); + this.displayUpdateMessageIfOutOfDate(); } if(neu.config.notifications.doRamNotif) { @@ -571,7 +599,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; @@ -1473,7 +1501,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 +1557,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) { @@ -2268,7 +2296,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..90025881 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,7 @@ 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/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java index cfab28e0..f6202cc3 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java @@ -90,7 +90,9 @@ import java.util.concurrent.atomic.AtomicInteger; public class NotEnoughUpdates { public static final String MODID = "notenoughupdates"; public static final String VERSION = "2.0.0-REL"; + public static final String PRE_VERSION = "30.2"; public static final int VERSION_ID = 20000; + public static final int PRE_VERSION_ID = 3002; public static NotEnoughUpdates INSTANCE = null; @@ -952,7 +954,7 @@ public class NotEnoughUpdates { } catch(Exception ignored) { } } - if(!config.hidden.dev) { + if(!NotEnoughUpdates.INSTANCE.config.hidden.dev) { openGui = new GuiDungeonMapEditor(); return; } 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..0489dd42 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java @@ -588,7 +588,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) { @@ -829,7 +829,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/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..f66a0783 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java @@ -2396,7 +2396,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; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/XPInformation.java b/src/main/java/io/github/moulberry/notenoughupdates/util/XPInformation.java index fc5d3e38..20219ff6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/XPInformation.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/XPInformation.java @@ -70,7 +70,7 @@ public class XPInformation { if(matcher.matches()) { String skillS = matcher.group(2); String currentXpS = matcher.group(3).replace(",",""); - String maxXpS = matcher.group(4).replace(",","");; + String maxXpS = matcher.group(4).replace(",",""); float currentXp = Float.parseFloat(currentXpS); float maxXp = Float.parseFloat(maxXpS); -- cgit From 4bd1befe84e210a0d5f106cc95c6698311c5904f Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Fri, 23 Jul 2021 15:14:04 -0400 Subject: fix: remove upload button since it doesn't work --- .../moulberry/notenoughupdates/NEUManager.java | 28 ------------------- .../notenoughupdates/infopanes/DevInfoPane.java | 7 +++-- .../notenoughupdates/itemeditor/NEUItemEditor.java | 31 ---------------------- 3 files changed, 5 insertions(+), 61 deletions(-) (limited to 'src/main') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java index 90025881..dd39768c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java @@ -3,8 +3,6 @@ package io.github.moulberry.notenoughupdates; import com.google.common.collect.Lists; import com.google.gson.*; import io.github.moulberry.notenoughupdates.auction.APIManager; -import io.github.moulberry.notenoughupdates.miscfeatures.StorageManager; -import io.github.moulberry.notenoughupdates.miscgui.GuiItemCustomize; import io.github.moulberry.notenoughupdates.miscgui.GuiItemRecipe; import io.github.moulberry.notenoughupdates.util.Constants; import io.github.moulberry.notenoughupdates.util.HypixelApi; @@ -1169,32 +1167,6 @@ public class NEUManager { return true; } - public boolean uploadItemJson(String internalname, String itemid, String displayname, String[] lore, String crafttext, String infoType, String[] info, - String clickcommand, int damage, NBTTagCompound nbttag) { - JsonObject json = createItemJson(internalname, itemid, displayname, lore, crafttext, infoType, info, clickcommand, damage, nbttag); - if(json == null) { - return false; - } - - String username = Minecraft.getMinecraft().thePlayer.getName(); - String newBranchName = UUID.randomUUID().toString().substring(0, 8) + "-" + internalname + "-" + username; - String prTitle = internalname + "-" + username; - String prBody = "Internal name: " + internalname + "\nSubmitted by: " + username; - String file = "items/"+internalname+".json"; - /*if(!neuio.createNewRequest(newBranchName, prTitle, prBody, file, gson.toJson(json))) { - return false; - }*/ - - try { - writeJsonDefaultDir(json, internalname+".json"); - } catch(IOException e) { - return false; - } - - loadItem(internalname); - return true; - } - public void writeJson(JsonObject json, File file) throws IOException { file.createNewFile(); 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 0489dd42..92adc9bb 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"; } @@ -82,6 +82,8 @@ public class DevInfoPane extends TextInfoPane { return text; } + //#region add vanilla items + AtomicBoolean running = new AtomicBoolean(false); ScheduledExecutorService ses = Executors.newScheduledThreadPool(1); @@ -1052,4 +1054,5 @@ public class DevInfoPane extends TextInfoPane { }*/ return false; } + //#endregion } 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..4614a6d3 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java @@ -116,23 +116,6 @@ public class NEUItemEditor extends GuiScreen { }.b; rightOptions.add(button); - 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")) { - b.setText("Confirm upload?"); - } else { - if(upload()) { - b.setText("Uploaded"); - } else { - b.setText("Upload failed."); - } - } - } - }); - }.b; - rightOptions.add(button); - rightOptions.add(new GuiElementText("", Color.WHITE.getRGB())); rightOptions.add(new GuiElementButton("Remove enchants", Color.RED.getRGB(), () -> { @@ -160,20 +143,6 @@ public class NEUItemEditor extends GuiScreen { crafttext.get(), infoType.get(), infoA, clickcommand.get(), damageI, nbttag); } - public boolean upload() { - int damageI = 0; - try { - damageI = Integer.valueOf(damage.get()); - } catch(NumberFormatException e) {} - resyncNbttag(); - String[] infoA = info.get().trim().split("\n"); - if(infoA.length == 0 || infoA[0].isEmpty()) { - infoA = new String[0]; - } - 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); } -- cgit From ef16103b67d12250bc027813563768d248ff081d Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Fri, 23 Jul 2021 15:14:39 -0400 Subject: feat: cutom minion teirs, add missing minions, add support for mythic pets --- .../moulberry/notenoughupdates/NEUOverlay.java | 8 +++--- .../notenoughupdates/NotEnoughUpdates.java | 11 +++++--- .../profileviewer/GuiProfileViewer.java | 31 ++++++++++++++++------ .../profileviewer/ProfileViewer.java | 24 +++++++++-------- 4 files changed, 49 insertions(+), 25 deletions(-) (limited to 'src/main') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index 2a6160f1..fa664ac6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -71,7 +71,7 @@ public class NEUOverlay extends Gui { private NEUManager manager; private String mobRegex = ".*?((_MONSTER)|(_ANIMAL)|(_MINIBOSS)|(_BOSS)|(_SC))$"; - private String petRegex = ".*?;[0-4]$"; + private String petRegex = ".*?;[0-5]$"; private ResourceLocation[] sortIcons = new ResourceLocation[] { sort_all, sort_mob, sort_pet, sort_tool, sort_armor, sort_accessory @@ -1044,7 +1044,8 @@ 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()+"SPECIAL", + EnumChatFormatting.LIGHT_PURPLE+EnumChatFormatting.BOLD.toString()+"MYTHIC", + EnumChatFormatting.RED+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 f6202cc3..5fb296d1 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java @@ -313,6 +313,7 @@ public class NotEnoughUpdates { petRarityToColourMap.put("RARE", EnumChatFormatting.BLUE.toString()); petRarityToColourMap.put("EPIC", EnumChatFormatting.DARK_PURPLE.toString()); petRarityToColourMap.put("LEGENDARY", EnumChatFormatting.GOLD.toString()); + petRarityToColourMap.put("MYTHIC", EnumChatFormatting.LIGHT_PURPLE.toString()); } ScheduledExecutorService peekCommandExecutorService = null; SimpleCommand peekCommand = new SimpleCommand("peek", new SimpleCommand.ProcessCommandRunnable() { @@ -391,6 +392,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; @@ -400,17 +402,20 @@ public class NotEnoughUpdates { zombie = 2; spider = 1; wolf = 2; + enderman = 0; } EnumChatFormatting combatPrefix = combat>20?(combat>35?EnumChatFormatting.GREEN:EnumChatFormatting.YELLOW):EnumChatFormatting.RED; 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); @@ -424,9 +429,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) { + if (stats == null) { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText( EnumChatFormatting.YELLOW+"Skills, collection and/or inventory apis disabled!")); } else { @@ -473,7 +478,7 @@ public class NotEnoughUpdates { String overall = "Skywars Main"; if(isMe) { - overall = Utils.chromaString("Literally the best player to exist"); + overall = Utils.chromaString("Literally the best player to exist"); // ego much } else if(overallScore < 5 && (bankBalance+purseBalance) > 500*1000*1000) { overall = EnumChatFormatting.GOLD+"Bill Gates"; } else if(overallScore > 9) { 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 f66a0783..5e7313d1 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,22 @@ 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 { @@ -2162,6 +2171,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 +2185,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 +2196,12 @@ 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*3, 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 + "Total Slayer XP", EnumChatFormatting.WHITE.toString() + Math.floor(totalSlayerXP * 10) / 10, + guiLeft + xStart, guiTop + yStartBottom + yOffset * 4, 76); } @@ -2478,9 +2492,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!"); + } } } } catch(Exception e){} diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java index b4fce512..4e61b7c1 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java @@ -43,6 +43,7 @@ public class ProfileViewer { petRarityToNumMap.put("RARE", "2"); petRarityToNumMap.put("EPIC", "3"); petRarityToNumMap.put("LEGENDARY", "4"); + petRarityToNumMap.put("MYTHIC", "5"); } private static final LinkedHashMap 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", "MITHRIL_ORE", null, "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", "MITHRIL", "SNOW","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)); @@ -112,7 +113,7 @@ public class ProfileViewer { private static final LinkedHashMap collectionToCollectionDisplayMap = new LinkedHashMap<>(); static { - /** FARMING COLLECTIONS **/ + /* FARMING COLLECTIONS **/ collectionToCollectionDisplayMap.put("WHEAT", Utils.createItemStack(Items.wheat, EnumChatFormatting.YELLOW+"Wheat")); collectionToCollectionDisplayMap.put("CARROT_ITEM", Utils.createItemStack(Items.carrot, @@ -149,7 +150,7 @@ public class ProfileViewer { collectionToCollectionDisplayMap.put("NETHER_STALK", Utils.createItemStack(Items.nether_wart, EnumChatFormatting.YELLOW+"Nether Wart")); - /** MINING COLLECTIONS **/ + /* MINING COLLECTIONS **/ collectionToCollectionDisplayMap.put("COBBLESTONE", Utils.createItemStack(Item.getItemFromBlock(Blocks.cobblestone), EnumChatFormatting.GRAY+"Cobblestone")); collectionToCollectionDisplayMap.put("COAL", Utils.createItemStack(Items.coal, @@ -192,7 +193,7 @@ public class ProfileViewer { collectionToCollectionDisplayMap.put("GEMSTONE_COLLECTION", gemstone); - /** COMBAT COLLECTIONS **/ + /* COMBAT COLLECTIONS **/ collectionToCollectionDisplayMap.put("ROTTEN_FLESH", Utils.createItemStack(Items.rotten_flesh, EnumChatFormatting.RED+"Rotten Flesh")); collectionToCollectionDisplayMap.put("BONE", Utils.createItemStack(Items.bone, @@ -214,7 +215,7 @@ public class ProfileViewer { collectionToCollectionDisplayMap.put("MAGMA_CREAM", Utils.createItemStack(Items.magma_cream, EnumChatFormatting.RED+"Magma Cream")); - /** FORAGING COLLECTIONS **/ + /* FORAGING COLLECTIONS **/ collectionToCollectionDisplayMap.put("LOG", Utils.createItemStack(Item.getItemFromBlock(Blocks.log), EnumChatFormatting.DARK_GREEN+"Oak")); collectionToCollectionDisplayMap.put("LOG:1", Utils.createItemStack(Item.getItemFromBlock(Blocks.log), @@ -228,7 +229,7 @@ public class ProfileViewer { collectionToCollectionDisplayMap.put("LOG:3", Utils.createItemStack(Item.getItemFromBlock(Blocks.log), EnumChatFormatting.DARK_GREEN+"Jungle", 3)); - /** FISHING COLLECTIONS **/ + /* FISHING COLLECTIONS **/ collectionToCollectionDisplayMap.put("RAW_FISH", Utils.createItemStack(Items.fish, EnumChatFormatting.AQUA+"Fish")); collectionToCollectionDisplayMap.put("RAW_FISH:1", Utils.createItemStack(Items.fish, @@ -798,6 +799,7 @@ public class ProfileViewer { String talisman_bag_bytes = Utils.getElementAsString(Utils.getElement(profileInfo, "talisman_bag.data"), "Hz8IAAAAAAAAAD9iYD9kYD9kAAMAPwI/Gw0AAAA="); String candy_inventory_contents_bytes = Utils.getElementAsString(Utils.getElement(profileInfo, "candy_inventory_contents.data"), "Hz8IAAAAAAAAAD9iYD9kYD9kAAMAPwI/Gw0AAAA="); + JsonObject inventoryInfo = new JsonObject(); String[] inv_names = new String[]{"inv_armor", "fishing_bag", "quiver", "ender_chest_contents", "backpack_contents", "personal_vault_contents", "wardrobe_contents", -- cgit From 8fb547095b567bf010d4decfdb4491215257f79c Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Fri, 23 Jul 2021 15:15:42 -0400 Subject: feat: add credits easter egg, link patreon, and make an issue template --- .github/FUNDING.yml | 12 ++++++++ .github/ISSUE_TEMPLATE/bug_report.md | 34 ++++++++++++++++++++++ .../moulberry/notenoughupdates/CustomItems.java | 2 ++ .../moulberry/notenoughupdates/NEUOverlay.java | 5 ++++ 4 files changed, 53 insertions(+) create mode 100644 .github/FUNDING.yml create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md (limited to 'src/main') diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..4598ba6a --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: Moulberry +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..5e58389d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,34 @@ +--- +name: Bug report +about: Help Moulberry pinpoint problems. +title: '[Bug] Title' +labels: '' +assignees: '' + +--- + + + + +**Mod Version:** + + +**Describe the bug** + + +**To Reproduce** +1. +2. + + +**Expected behavior** + + +**Attachments** \ No newline at end of file diff --git a/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java b/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java index dcd8cfb2..47b6401d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java @@ -3,6 +3,7 @@ package io.github.moulberry.notenoughupdates; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; +import io.github.moulberry.notenoughupdates.util.Constants; import net.minecraft.util.EnumChatFormatting; public class CustomItems { @@ -61,6 +62,7 @@ public class CustomItems { "39 legendary phoenix pets", "", "get flexed"); + public static JsonObject CREDITS = Constants.MISC.getAsJsonObject("credits"); /** * SHAAAAAAAAAAAAAAAAAAME diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index fa664ac6..ffee4c2b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -1272,6 +1272,11 @@ public class NEUOverlay extends Gui { case "spinaxx": searchedItems.add(CustomItems.SPINAXX); break; + case "credits": + case "credit": + case "who made this mod": + searchedItems.add(CustomItems.CREDITS); + break; } this.searchedItems = searchedItems; -- cgit From 1720abf26bfb9d42a242f9b7d273997c1497d845 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Fri, 23 Jul 2021 15:16:29 -0400 Subject: chore: add ironmoon easter egg and update ironmoon cape --- .../moulberry/notenoughupdates/CustomItems.java | 7 +++++++ .../moulberry/notenoughupdates/NEUOverlay.java | 4 ++++ .../notenoughupdates/NotEnoughUpdates.java | 9 +++++++-- .../assets/notenoughupdates/capes/ironmoon.png | Bin 125436 -> 142131 bytes .../notenoughupdates/capes/ironmoon_preview.png | Bin 62509 -> 92492 bytes 5 files changed, 18 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java b/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java index 47b6401d..c16cb7d0 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/CustomItems.java @@ -63,6 +63,13 @@ public class CustomItems { "", "get flexed"); public static JsonObject CREDITS = Constants.MISC.getAsJsonObject("credits"); + public static JsonObject IRONM00N = create( + "IRONM00N", + "end_stone", + "IRONM00N", + "Your life has been a lie,", + "the moon is made out of iron." + ); /** * SHAAAAAAAAAAAAAAAAAAME diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index ffee4c2b..bf85a6a6 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -1277,6 +1277,10 @@ public class NEUOverlay extends Gui { case "who made this mod": searchedItems.add(CustomItems.CREDITS); break; + case "ironmoon": + case "ironm00n": + searchedItems.add(CustomItems.IRONM00N); + break; } this.searchedItems = searchedItems; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java index 5fb296d1..15c86aaa 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java @@ -734,11 +734,11 @@ 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")); 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 @@ -830,6 +830,11 @@ public class NotEnoughUpdates { return; } + + /* if(args.length == 1 && args[0].equalsIgnoreCase("update")) { + NEUEventListener.displayUpdateMessageIfOutOfDate(); + } */ + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN+"Executing dubious code")); /*Minecraft.getMinecraft().thePlayer.rotationYaw = 0; Minecraft.getMinecraft().thePlayer.rotationPitch = 0; diff --git a/src/main/resources/assets/notenoughupdates/capes/ironmoon.png b/src/main/resources/assets/notenoughupdates/capes/ironmoon.png index 9cf49a6f..b25221d9 100644 Binary files a/src/main/resources/assets/notenoughupdates/capes/ironmoon.png and b/src/main/resources/assets/notenoughupdates/capes/ironmoon.png differ diff --git a/src/main/resources/assets/notenoughupdates/capes/ironmoon_preview.png b/src/main/resources/assets/notenoughupdates/capes/ironmoon_preview.png index 252ebbb3..c233128a 100644 Binary files a/src/main/resources/assets/notenoughupdates/capes/ironmoon_preview.png and b/src/main/resources/assets/notenoughupdates/capes/ironmoon_preview.png differ -- cgit From 377ba0b7f1332503d14c21f2208e3613ed2a7562 Mon Sep 17 00:00:00 2001 From: DoKM Date: Sat, 24 Jul 2021 19:44:17 +0200 Subject: Add edit buttons to other gui overlays please dont hate my "art", i tried --- .../notenoughupdates/storage_gui/storage_gui_1.png | Bin 12408 -> 4726 bytes .../notenoughupdates/storage_gui/storage_gui_2.png | Bin 10543 -> 4341 bytes .../notenoughupdates/storage_gui/storage_gui_3.png | Bin 10623 -> 4417 bytes 3 files changed, 0 insertions(+), 0 deletions(-) (limited to 'src/main') diff --git a/src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_1.png b/src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_1.png index d9703226..e8fdd727 100644 Binary files a/src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_1.png and b/src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_1.png differ diff --git a/src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_2.png b/src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_2.png index 5b016cea..9c1ff275 100644 Binary files a/src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_2.png and b/src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_2.png differ diff --git a/src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_3.png b/src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_3.png index f6c3e88e..fe03a5bd 100644 Binary files a/src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_3.png and b/src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_3.png differ -- 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') 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') 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') 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') 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