aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTymanWasTaken <tyman@tyman.tech>2021-07-07 20:35:21 -0400
committerTymanWasTaken <tyman@tyman.tech>2021-07-07 20:35:21 -0400
commitdabee21244cdcacc9b49b2ee0d006876970e6001 (patch)
tree05c0064e2f5287cf2e82a9debdbad49717de3954 /src
parent81f11c4bdfd7444440f1c17315c40a57796db419 (diff)
downloadSkyblockHud-Death-Defied-dabee21244cdcacc9b49b2ee0d006876970e6001.tar.gz
SkyblockHud-Death-Defied-dabee21244cdcacc9b49b2ee0d006876970e6001.tar.bz2
SkyblockHud-Death-Defied-dabee21244cdcacc9b49b2ee0d006876970e6001.zip
Format because yes
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/Utils.java9
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/api/LeaderboardGetter.java9
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java20
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleCommand.java3
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleSubCommand.java15
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java5
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java7
7 files changed, 25 insertions, 43 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/Utils.java b/src/main/java/com/thatgravyboat/skyblockhud/Utils.java
index 8598e1f..62cf6a3 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/Utils.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/Utils.java
@@ -1,5 +1,9 @@
package com.thatgravyboat.skyblockhud;
+import java.nio.FloatBuffer;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedList;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.gui.FontRenderer;
@@ -16,11 +20,6 @@ import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL14;
-import java.nio.FloatBuffer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.LinkedList;
-
public class Utils {
private static LinkedList<Integer> guiScales = new LinkedList<>();
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/api/LeaderboardGetter.java b/src/main/java/com/thatgravyboat/skyblockhud/api/LeaderboardGetter.java
index 41a4ad8..8c71f57 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/api/LeaderboardGetter.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/api/LeaderboardGetter.java
@@ -1,9 +1,13 @@
package com.thatgravyboat.skyblockhud.api;
+import static com.thatgravyboat.skyblockhud.ComponentHandler.SCOREBOARD_CHARACTERS;
+
import com.thatgravyboat.skyblockhud.Utils;
import com.thatgravyboat.skyblockhud.api.events.SidebarLineUpdateEvent;
import com.thatgravyboat.skyblockhud.api.events.SidebarPostEvent;
import com.thatgravyboat.skyblockhud.api.events.SidebarPreGetEvent;
+import java.util.*;
+import java.util.stream.Collectors;
import net.minecraft.client.Minecraft;
import net.minecraft.scoreboard.Score;
import net.minecraft.scoreboard.ScoreObjective;
@@ -13,11 +17,6 @@ import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
-import java.util.*;
-import java.util.stream.Collectors;
-
-import static com.thatgravyboat.skyblockhud.ComponentHandler.SCOREBOARD_CHARACTERS;
-
public class LeaderboardGetter {
private static Map<Integer, String> cachedScores = new HashMap<>();
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java b/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
index 897c088..9f0a22d 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
@@ -8,6 +8,8 @@ import com.thatgravyboat.skyblockhud.core.GuiScreenElementWrapper;
import com.thatgravyboat.skyblockhud.handlers.MapHandler;
import com.thatgravyboat.skyblockhud.location.LocationHandler;
import com.thatgravyboat.skyblockhud.playerstats.ActionBarParsing;
+import java.awt.*;
+import java.awt.datatransfer.StringSelection;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.boss.BossStatus;
import net.minecraft.util.ChatComponentText;
@@ -15,9 +17,6 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.client.ClientCommandHandler;
import org.apache.commons.lang3.StringUtils;
-import java.awt.*;
-import java.awt.datatransfer.StringSelection;
-
public class Commands {
private static boolean devMode = false;
@@ -33,7 +32,6 @@ public class Commands {
};
private static final SimpleSubCommand devCommand = new SimpleSubCommand("sbhdev", ImmutableSet.of("copyBossBar", "copyScoreboard", "copyActionBar")) {
-
@Override
void processSubCommand(ICommandSender sender, String subCommand, String[] args) {
StringSelection clipboard = null;
@@ -52,16 +50,7 @@ public class Commands {
}
if (clipboard != null) {
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(clipboard, clipboard);
- sender.addChatMessage(new ChatComponentText(
- "[" +
- EnumChatFormatting.RED +
- EnumChatFormatting.BOLD +
- "SkyBlockHud" +
- EnumChatFormatting.RESET +
- "] : " +
- EnumChatFormatting.GRAY +
- "Info copied to clipboard!"
- ));
+ sender.addChatMessage(new ChatComponentText("[" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + "SkyBlockHud" + EnumChatFormatting.RESET + "] : " + EnumChatFormatting.GRAY + "Info copied to clipboard!"));
}
}
@@ -80,8 +69,7 @@ public class Commands {
"sbhmap",
new SimpleCommand.ProcessCommandRunnable() {
public void processCommand(ICommandSender sender, String[] args) {
- if (LocationHandler.getCurrentLocation().getCategory().getMap() != null && SkyblockHud.hasSkyblockScoreboard())
- SkyblockHud.screenToOpen = new MapHandler.MapScreen();
+ if (LocationHandler.getCurrentLocation().getCategory().getMap() != null && SkyblockHud.hasSkyblockScoreboard()) SkyblockHud.screenToOpen = new MapHandler.MapScreen();
}
}
);
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleCommand.java b/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleCommand.java
index d5d3c57..57ef316 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleCommand.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleCommand.java
@@ -1,11 +1,10 @@
package com.thatgravyboat.skyblockhud.commands;
+import java.util.List;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.util.BlockPos;
-import java.util.List;
-
/**
@author Moulberry
**/
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleSubCommand.java b/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleSubCommand.java
index 7169c6d..6bb62ac 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleSubCommand.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/commands/SimpleSubCommand.java
@@ -1,13 +1,12 @@
package com.thatgravyboat.skyblockhud.commands;
+import java.util.List;
+import java.util.Set;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.util.BlockPos;
import org.apache.commons.lang3.ArrayUtils;
-import java.util.List;
-import java.util.Set;
-
public abstract class SimpleSubCommand extends CommandBase {
private final String commandName;
@@ -25,7 +24,7 @@ public abstract class SimpleSubCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender sender) {
- return "/"+commandName;
+ return "/" + commandName;
}
@Override
@@ -34,7 +33,7 @@ public abstract class SimpleSubCommand extends CommandBase {
processNoSubCommand(sender);
return;
}
- if (subCommands.contains(args[0])){
+ if (subCommands.contains(args[0])) {
processSubCommand(sender, args[0], ArrayUtils.remove(args, 0));
return;
}
@@ -48,8 +47,8 @@ public abstract class SimpleSubCommand extends CommandBase {
@Override
public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
- if (args.length == 1){
- return getListOfStringsMatchingLastWord(args,subCommands);
+ if (args.length == 1) {
+ return getListOfStringsMatchingLastWord(args, subCommands);
}
return null;
}
@@ -58,5 +57,5 @@ public abstract class SimpleSubCommand extends CommandBase {
abstract void processNoSubCommand(ICommandSender sender);
- public void processBadSubCommand(ICommandSender sender, String subCommand){}
+ public void processBadSubCommand(ICommandSender sender, String subCommand) {}
}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java
index ee23b7e..47e69b9 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java
@@ -5,6 +5,8 @@ import com.thatgravyboat.skyblockhud.GuiTextures;
import com.thatgravyboat.skyblockhud.SkyblockHud;
import com.thatgravyboat.skyblockhud.Utils;
import com.thatgravyboat.skyblockhud.core.config.Position;
+import java.text.DecimalFormat;
+import java.text.NumberFormat;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
@@ -13,9 +15,6 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
-import java.text.DecimalFormat;
-import java.text.NumberFormat;
-
public class RPGHud extends Gui {
private static int mana, maxMana, overflow = 0;
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java b/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java
index 5340fad..32e23a3 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java
@@ -3,6 +3,8 @@ package com.thatgravyboat.skyblockhud.playerstats;
import com.thatgravyboat.skyblockhud.SkyblockHud;
import com.thatgravyboat.skyblockhud.Utils;
import com.thatgravyboat.skyblockhud.overlay.RPGHud;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.IChatComponent;
import net.minecraftforge.client.event.ClientChatReceivedEvent;
@@ -10,9 +12,6 @@ import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
public class ActionBarParsing {
private static String lastActionBar = "";
@@ -66,7 +65,7 @@ public class ActionBarParsing {
message = DefenseReplaceRegex.matcher(message).replaceAll("");
message = ManaReplaceRegex.matcher(message).replaceAll("");
Matcher overflowMatcher = ManaOverflowReplaceRegex.matcher(message);
- if (overflowMatcher.find()){
+ if (overflowMatcher.find()) {
message = overflowMatcher.replaceAll("\u00A73\u02AC " + overflowMatcher.group(3));
}