diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-23 15:14:39 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-23 15:14:39 -0400 |
commit | ef16103b67d12250bc027813563768d248ff081d (patch) | |
tree | cda9233351c50ff63a079a8c9b734d8c0162095b /src | |
parent | 4bd1befe84e210a0d5f106cc95c6698311c5904f (diff) | |
download | NotEnoughUpdates-ef16103b67d12250bc027813563768d248ff081d.tar.gz NotEnoughUpdates-ef16103b67d12250bc027813563768d248ff081d.tar.bz2 NotEnoughUpdates-ef16103b67d12250bc027813563768d248ff081d.zip |
feat: cutom minion teirs, add missing minions, add support for mythic pets
Diffstat (limited to 'src')
4 files changed, 49 insertions, 25 deletions
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<String> minions = ProfileViewer.getCollectionCatToMinionMap().get(selectedCollectionCategory);
if(minions != null) {
for(int i=0; i<minions.size(); i++) {
String minion = minions.get(i);
if(minion != null) {
- JsonObject minionJson = NotEnoughUpdates.INSTANCE.manager.getItemInformation().get(minion+"_GENERATOR_1");
+ JsonObject misc = Constants.MISC;
+ float MAX_MINION_TIER = Utils.getElementAsFloat(Utils.getElement(misc, "minions." + minion + "_GENERATOR"), 11);
+
+ int tier = (int) Utils.getElementAsFloat(minionTiers.get(minion), 0);
+ JsonObject minionJson;
+ if (tier == 0) {
+ minionJson = NotEnoughUpdates.INSTANCE.manager.getItemInformation().get(minion + "_GENERATOR_1");
+ } else {
+ minionJson = NotEnoughUpdates.INSTANCE.manager.getItemInformation().get(minion + "_GENERATOR_" + tier);
+ }
+
if(minionJson != null) {
int xIndex = i%COLLS_XCOUNT;
int yIndex = i/COLLS_XCOUNT;
@@ -1539,7 +1548,7 @@ public class GuiProfileViewer extends GuiScreen { float y = 7+COLLS_YPADDING+(COLLS_YPADDING+20)*yIndex;
String tierString;
- int tier = (int)Utils.getElementAsFloat(minionTiers.get(minion), 0);
+
if(tier-1 >= 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<String, JsonElement> 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<String, ItemStack> 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<String, ItemStack> 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",
|