diff options
author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2022-06-12 05:21:52 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-11 15:21:52 -0400 |
commit | b3a62c57c3bb5f2e2bb033bb08e085a30be8e570 (patch) | |
tree | 604fc808a7a1a2abe2207d8bc2587bda0bd19825 | |
parent | ce23654aff4c315fde75d57c0cfde5b9e2d4bfe0 (diff) | |
download | NotEnoughUpdates-b3a62c57c3bb5f2e2bb033bb08e085a30be8e570.tar.gz NotEnoughUpdates-b3a62c57c3bb5f2e2bb033bb08e085a30be8e570.tar.bz2 NotEnoughUpdates-b3a62c57c3bb5f2e2bb033bb08e085a30be8e570.zip |
added social and equipment to pv (#158)
* Added equippment to pv
* not working :thumn up :trollface:
* working i think
* i forgot
* 2.1md gaming
* Fixing offset i think?
* Rename social_xp -> social
* thank you hy pixel for making equipemnt in a different order to armoru
Co-authored-by: jani270 <jani270@gmx.de>
Co-authored-by: jani270 <69345714+jani270@users.noreply.github.com>
Co-authored-by: kr45732 <52721908+kr45732@users.noreply.github.com>
-rw-r--r-- | Update Notes/2.1.md | 30 | ||||
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java | 1 | ||||
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java | 28 | ||||
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java | 22 | ||||
-rw-r--r-- | src/main/resources/assets/notenoughupdates/pv_invs.png | bin | 4446 -> 2426 bytes |
5 files changed, 65 insertions, 16 deletions
diff --git a/Update Notes/2.1.md b/Update Notes/2.1.md index 1a5e1aef..fe32ed69 100644 --- a/Update Notes/2.1.md +++ b/Update Notes/2.1.md @@ -6,30 +6,40 @@ - Added fishing skill overlay - Added combat skill overlay - Added slayer overlay -- Added trophy fishing pv tab - efefury -- [Added mining tab in /pv](https://cdn.discordapp.com/attachments/832652653292027904/903619242384056370/unknown.png) -- Big thanks to kwev1n for some math and jani for the texture - Added blocking clicks back to the enchanting minigames (because apparently, it's not bannable?) - [Donpireso replied to a sba dev's email about some of sba features, and it seems to imply that blocking clicks in guis aren't bannable](https://cdn.discordapp.com/attachments/823769568933576764/906101631861526559/unknown.png) - Fixed pet overlay not updating when going into /pets - [Added an armor overlay for the new armor slots](https://cdn.discordapp.com/attachments/832652653292027904/922399046528794634/unknown.png) - Added a pet overlay that shows your active pet in your inventory - [Price graph for items on /ah and /bz](https://cdn.discordapp.com/attachments/896407218151366687/926968296929107999/unknown.png) - DeDiamondPro -- [Added bingo tab in /pv](https://cdn.discordapp.com/attachments/702456294874808330/951909539383500820/unknown.png) - Lulonaut - Added wishing compass solver that shows target coordinates, structure, and integrates with Skytils waypoints - CraftyOldMiner - Improved metal detector logic to solve using a single position in most cases using known locations based on Keeper coordinates - CraftyOldMiner - Added support for official Hypixel wiki, can be toggled in /neu misc - DeDiamondPro +- Added and fixed various things in the profile viewer: + - [Added mining tab](https://cdn.discordapp.com/attachments/832652653292027904/903619242384056370/unknown.png) + - Big thanks to kwev1n for some math and jani for the texture + - [Added bingo tab](https://cdn.discordapp.com/attachments/702456294874808330/951909539383500820/unknown.png) - Lulonaut + - [Added bingo and Stranded profile icons to /pv](https://cdn.discordapp.com/attachments/832652653292027904/915844465372065842/unknown.png) + - Added trophy fishing tab - efefury + - Added equipment + - Added blaze slayer level and kills + - Added social level + - Added various new collections and minions + - Added mastermode catacombs xp to level calculator + - Added profile viewer settings to /neu + - Added an unknown icon if neu doesn't recognize your profile type + - Added total xp to catacombs level - efefury + - Fixed minion tiers crafted by coop members not showing up in /pv - Lulonaut + - Fixed crash in /pv when the player had a pet that is not saved in the repo - Lulonaut ### **Minor Changes:** - Add built-in recipes for forge crafts - nea89 - Add mob drop viewer in the recipe viewer - nea89 - Add Stranded Villager Trades to the item list - nea89 -- Make cata xp in /pv be calculated on how many runs you have and shows master mode xp rates - Added a config option to hide Dwarven Mines waypoints when already at the location - Lulonaut - Added some info panels to some settings in /neu - Added Kat Level After Upgrade Estimator - nea89 -- Added /pv button in /neu - Added pitch and coins/m as options in farming skill overlay - Make it so tab completion in ah search GUI goes down the items - Lulonaut - Added a toggle for enchant glint in storage gui (ty ery for texture) @@ -54,14 +64,11 @@ - Turns off inv search mode after 2 minutes - Made /neustats modlist show normal /neustats if under 15 mods - Added max enchant book and max attribute shard to /neuec - Dokm -- [Added bingo and Stranded profile icons to /pv](https://cdn.discordapp.com/attachments/832652653292027904/915844465372065842/unknown.png) -- Added an icon if neu doesn't know about a gamemode in /pv - Fixed pet overlay not resetting pet when making new profile - Added a warning in the tooltip when price info couldn't be found/is outdated - Lulonaut - Added "Has Advanced Tab" to /neustats - Added custom runes and crab hat system - jani - Removed unused textures -- Added total xp if player is above cata 50 in /pv - efefury - Added daily powder to todo overlay - efefury - Added a way to include kismet feather to profit calculator - efefury - Added custom sounds for crystal hollow gemstones - nea89 @@ -69,7 +76,6 @@ - Added a config option to hide the reforge stats for Legendary items from Hypixel on reforge stones - Lulonaut - Added an option to alert you if you put something for too much onto ah (default 50%) - Lowest bin alert triggers if lowest bin isnt found -- Made the order of the tabs in /pv changeable - Lulonaut - Crystal Hollows crystal states are now updated when the Heart of the Mountain menu is opened - CraftyOldMiner - Added /neudiag command to enable/disable debug logging and dump diagnostic data - CraftyOldMiner - Added NBT data to Profile Viewer HOTM tree icons - whalker @@ -116,8 +122,6 @@ - Fixed what hypxiel broke in dungeons - Fixed the dungeon map on f1 - Minikloon - Added checks for chat messages for dungeon win overlay -- Fixed minion tiers crafted by coop members not showing up in /pv - Lulonaut -- Fixed crash in /pv when the player had a pet that is not saved in the repo - Lulonaut - Fixed some vanilla Minecraft keybinds not working in NEU GUIs - Fixed crash with spamming remove enchant in /neuec @@ -134,4 +138,4 @@ ### **Previous change log** -https://github.com/NotEnoughUpdates/NotEnoughUpdates/blob/master/Update%20Notes/2.0-Pre31-Release.md +https://github.com/NotEnoughUpdates/NotEnoughUpdates/blob/master/Update%20Notes/2.0-Pre31-Release.md
\ No newline at end of file diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java index 408c8a6d..0aade4b0 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java @@ -174,6 +174,7 @@ public class ChatListener { ); Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText( EnumChatFormatting.YELLOW + "[NEU] API Key automatically configured")); + NotEnoughUpdates.INSTANCE.saveConfig(); } else if (unformatted.startsWith("Player List Info is now disabled!")) { SBInfo.getInstance().hasNewTab = false; } else if (unformatted.startsWith("Player List Info is now enabled!")) { 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 e4014ca3..3f131465 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java @@ -265,6 +265,7 @@ public class GuiProfileViewer extends GuiScreen { private ItemStack[] bestWeapons = null; private ItemStack[] bestRods = null; private ItemStack[] armorItems = null; + private ItemStack[] equipmentItems = null; private HashMap<String, ItemStack[][][]> inventoryItems = new HashMap<>(); private String selectedInventory = "inv_contents"; private int currentInventoryIndex = 0; @@ -2936,6 +2937,32 @@ public class GuiProfileViewer extends GuiScreen { } } + if (equipmentItems == null) { + equipmentItems = new ItemStack[4]; + JsonArray equippment = Utils.getElement(inventoryInfo, "equippment_contents").getAsJsonArray(); + for (int i = 0; i < equippment.size(); i++) { + if (equippment.get(i) == null || !equippment.get(i).isJsonObject()) continue; + equipmentItems[i] = NotEnoughUpdates.INSTANCE.manager.jsonToStack(equippment.get(i).getAsJsonObject(), false); + } + } + + for (int i = 0; i < equipmentItems.length; i++) { + ItemStack stack = equipmentItems[i]; + if (stack != null) { + Utils.drawItemStack(stack, guiLeft + 192, guiTop + 13 + 18 * i); + if (stack != fillerStack) { + if (mouseX >= guiLeft + 192 - 1 && mouseX <= guiLeft + 192 + 16 + 1) { + if (mouseY >= guiTop + 13 + 18 * i - 1 && mouseY <= guiTop + 13 + 18 * i + 16 + 1) { + tooltipToDisplay = stack.getTooltip( + Minecraft.getMinecraft().thePlayer, + Minecraft.getMinecraft().gameSettings.advancedItemTooltips + ); + } + } + } + } + } + ItemStack[][][] inventories = getItemsForInventory(inventoryInfo, selectedInventory); if (currentInventoryIndex >= inventories.length) currentInventoryIndex = inventories.length - 1; if (currentInventoryIndex < 0) currentInventoryIndex = 0; @@ -5236,6 +5263,7 @@ public class GuiProfileViewer extends GuiScreen { bestWeapons = null; bestRods = null; armorItems = null; + equipmentItems = null; inventoryItems = new HashMap<>(); currentInventoryIndex = 0; arrowCount = -1; 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 5ed84b03..9da55d64 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java @@ -84,6 +84,7 @@ public class ProfileViewer { "skill_runecrafting", Utils.createItemStack(Items.magma_cream, EnumChatFormatting.DARK_PURPLE + "Runecrafting") ); + put("skill_social2", Utils.createItemStack(Items.emerald, EnumChatFormatting.DARK_GREEN + "Social")); // put("skill_catacombs", Utils.createItemStack(Item.getItemFromBlock(Blocks.deadbush), EnumChatFormatting.GOLD+"Catacombs")); put("slayer_zombie", Utils.createItemStack(Items.rotten_flesh, EnumChatFormatting.GOLD + "Rev Slayer")); put("slayer_spider", Utils.createItemStack(Items.spider_eye, EnumChatFormatting.GOLD + "Tara Slayer")); @@ -883,6 +884,8 @@ public class ProfileViewer { Utils.getElementAsFloat(Utils.getElement(profileInfo, "experience_skill_alchemy"), 0); float experience_skill_runecrafting = Utils.getElementAsFloat(Utils.getElement(profileInfo, "experience_skill_runecrafting"), 0); + float experience_skill_social = + Utils.getElementAsFloat(Utils.getElement(profileInfo, "experience_skill_social2"), 0); float experience_skill_hotm = Utils.getElementAsFloat(Utils.getElement(profileInfo, "mining_core.experience"), 0); float experience_skill_catacombs = @@ -901,7 +904,7 @@ public class ProfileViewer { float totalSkillXP = experience_skill_taming + experience_skill_mining + experience_skill_foraging + experience_skill_enchanting + experience_skill_carpentry + experience_skill_farming + experience_skill_combat + experience_skill_fishing + experience_skill_alchemy - + experience_skill_runecrafting; + + experience_skill_runecrafting + experience_skill_social; if (totalSkillXP <= 0) { return null; @@ -919,6 +922,7 @@ public class ProfileViewer { skillInfo.addProperty("experience_skill_fishing", experience_skill_fishing); skillInfo.addProperty("experience_skill_alchemy", experience_skill_alchemy); skillInfo.addProperty("experience_skill_runecrafting", experience_skill_runecrafting); + skillInfo.addProperty("experience_skill_social2", experience_skill_social); skillInfo.addProperty("experience_skill_hotm", experience_skill_hotm); skillInfo.addProperty("experience_skill_catacombs", experience_skill_catacombs); @@ -948,6 +952,9 @@ public class ProfileViewer { Level level_skill_runecrafting = getLevel(Utils.getElement(leveling, "runecrafting_xp").getAsJsonArray(), experience_skill_runecrafting, getCap(leveling, "runecrafting"), false ); + Level level_skill_social = getLevel(Utils.getElement(leveling, "social").getAsJsonArray(), + experience_skill_social, getCap(leveling, "social"), false + ); Level level_skill_catacombs = getLevel(Utils.getElement(leveling, "catacombs").getAsJsonArray(), experience_skill_catacombs, getCap(leveling, "catacombs"), false ); @@ -978,6 +985,7 @@ public class ProfileViewer { skillInfo.addProperty("level_skill_fishing", level_skill_fishing.level); skillInfo.addProperty("level_skill_alchemy", level_skill_alchemy.level); skillInfo.addProperty("level_skill_runecrafting", level_skill_runecrafting.level); + skillInfo.addProperty("level_skill_social2", level_skill_social.level); skillInfo.addProperty("level_skill_catacombs", level_skill_catacombs.level); @@ -997,6 +1005,7 @@ public class ProfileViewer { skillInfo.addProperty("maxed_skill_fishing", level_skill_fishing.maxed); skillInfo.addProperty("maxed_skill_alchemy", level_skill_alchemy.maxed); skillInfo.addProperty("maxed_skill_runecrafting", level_skill_runecrafting.maxed); + skillInfo.addProperty("maxed_skill_social2", level_skill_social.maxed); skillInfo.addProperty("maxed_skill_catacombs", level_skill_catacombs.maxed); @@ -1016,6 +1025,7 @@ public class ProfileViewer { skillInfo.addProperty("maxxp_skill_fishing", level_skill_fishing.maxXpForLevel); skillInfo.addProperty("maxxp_skill_alchemy", level_skill_alchemy.maxXpForLevel); skillInfo.addProperty("maxxp_skill_runecrafting", level_skill_runecrafting.maxXpForLevel); + skillInfo.addProperty("maxxp_skill_social2", level_skill_social.maxXpForLevel); skillInfo.addProperty("maxxp_skill_catacombs", level_skill_catacombs.maxXpForLevel); @@ -1079,6 +1089,10 @@ public class ProfileViewer { Utils.getElement(profileInfo, "candy_inventory_contents.data"), "Hz8IAAAAAAAAAD9iYD9kYD9kAAMAPwI/Gw0AAAA=" ); + String equipment_contents_bytes = Utils.getElementAsString( + Utils.getElement(profileInfo, "equippment_contents.data"), + "Hz8IAAAAAAAAAD9iYD9kYD9kAAMAPwI/Gw0AAAA=" + ); JsonObject inventoryInfo = new JsonObject(); @@ -1093,7 +1107,8 @@ public class ProfileViewer { "potion_bag", "inv_contents", "talisman_bag", - "candy_inventory_contents" + "candy_inventory_contents", + "equippment_contents" }; String[] inv_bytes = new String[]{ inv_armor_bytes, @@ -1106,7 +1121,8 @@ public class ProfileViewer { potion_bag_bytes, inv_contents_bytes, talisman_bag_bytes, - candy_inventory_contents_bytes + candy_inventory_contents_bytes, + equipment_contents_bytes }; for (int i = 0; i < inv_bytes.length; i++) { try { diff --git a/src/main/resources/assets/notenoughupdates/pv_invs.png b/src/main/resources/assets/notenoughupdates/pv_invs.png Binary files differindex 881078d2..46c7b0e9 100644 --- a/src/main/resources/assets/notenoughupdates/pv_invs.png +++ b/src/main/resources/assets/notenoughupdates/pv_invs.png |