aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
diff options
context:
space:
mode:
authorMoulberry <jjenour@student.unimelb.edu.au>2021-07-26 01:36:28 +0800
committerGitHub <noreply@github.com>2021-07-26 01:36:28 +0800
commitc9975b9c20161c929e2c29640eab767f97df4105 (patch)
treea8e4a0c84dc559be1925b230dc719423dd2a5ff1 /src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
parent0f48092ef19488a43114478095f1d4a2040d369c (diff)
parenta7dde6d4582ad1b2474b0f59c1c74dd70b654a98 (diff)
downloadnotenoughupdates-c9975b9c20161c929e2c29640eab767f97df4105.tar.gz
notenoughupdates-c9975b9c20161c929e2c29640eab767f97df4105.tar.bz2
notenoughupdates-c9975b9c20161c929e2c29640eab767f97df4105.zip
Merge pull request #213 from IRONM00N/pr
Misc. Improvements now without formatting or conflicts
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
index cfab28e0..c638eca6 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;
@@ -311,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() {
@@ -389,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;
@@ -398,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);
@@ -422,9 +429,11 @@ 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 {
@@ -471,7 +480,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) {
@@ -727,11 +736,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<String> 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
@@ -823,6 +833,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;
@@ -952,7 +967,7 @@ public class NotEnoughUpdates {
} catch(Exception ignored) { }
}
- if(!config.hidden.dev) {
+ if(!NotEnoughUpdates.INSTANCE.config.hidden.dev) {
openGui = new GuiDungeonMapEditor();
return;
}