From 39749967fc92a3976b231285492d71f8782e93da Mon Sep 17 00:00:00 2001 From: ThatGravyBoat Date: Wed, 21 Jul 2021 14:46:42 +0000 Subject: Prettified Code! --- .../thatgravyboat/skyblockhud/ComponentHandler.java | 7 +++---- .../com/thatgravyboat/skyblockhud/SkyblockHud.java | 11 +++++------ .../skyblockhud/api/LeaderboardGetter.java | 9 ++++----- .../core/config/gui/GuiOptionEditorDraggableList.java | 11 +++++------ .../core/config/gui/GuiPositionEditor.java | 2 +- .../skyblockhud/core/util/GuiElementSlider.java | 7 +++---- .../skyblockhud/dungeons/DungeonHandler.java | 5 ++--- .../skyblockhud/handlers/BossbarHandler.java | 2 +- .../skyblockhud/handlers/CrystalWaypoints.java | 2 +- .../skyblockhud/handlers/CurrencyHandler.java | 2 +- .../skyblockhud/handlers/MapHandler.java | 19 +++++++------------ .../skyblockhud/handlers/NpcDialogue.java | 2 +- .../skyblockhud/handlers/SlayerHandler.java | 2 +- .../skyblockhud/handlers/mapicons/DwarvenIcons.java | 5 ++--- .../skyblockhud/handlers/mapicons/HubIcons.java | 5 ++--- .../skyblockhud/location/IslandHandler.java | 2 +- .../skyblockhud/location/LocationCategory.java | 4 ++-- .../skyblockhud/mixins/MixinGuiIngameForge.java | 4 ++-- .../skyblockhud/overlay/DungeonOverlay.java | 4 ++-- .../thatgravyboat/skyblockhud/overlay/MiningHud.java | 2 +- .../thatgravyboat/skyblockhud/overlay/OverlayHud.java | 2 +- .../com/thatgravyboat/skyblockhud/overlay/RPGHud.java | 2 +- .../skyblockhud/playerstats/ActionBarParsing.java | 5 ++--- .../skyblockhud/seasons/SeasonDateHandler.java | 3 +-- .../thatgravyboat/skyblockhud/textures/Textures.java | 9 ++++----- .../skyblockhud/tracker/TrackerHandler.java | 3 +-- .../com/thatgravyboat/skyblockhud/utils/Utils.java | 17 ++++++++--------- 27 files changed, 65 insertions(+), 83 deletions(-) diff --git a/src/main/java/com/thatgravyboat/skyblockhud/ComponentHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/ComponentHandler.java index 279a50f..83b2c09 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/ComponentHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/ComponentHandler.java @@ -6,6 +6,9 @@ import com.thatgravyboat.skyblockhud.dungeons.DungeonHandler; import com.thatgravyboat.skyblockhud.location.*; import com.thatgravyboat.skyblockhud.seasons.SeasonDateHandler; import com.thatgravyboat.skyblockhud.utils.Utils; +import java.util.Comparator; +import java.util.List; +import java.util.regex.Pattern; import net.minecraft.client.Minecraft; import net.minecraft.client.network.NetworkPlayerInfo; import net.minecraft.scoreboard.ScorePlayerTeam; @@ -18,10 +21,6 @@ import net.minecraftforge.fml.common.gameevent.TickEvent; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import java.util.Comparator; -import java.util.List; -import java.util.regex.Pattern; - public class ComponentHandler { public static final Pattern SCOREBOARD_CHARACTERS = Pattern.compile("[^]\\[a-z A-Z:0-9/'.()+\\d-ยง?]"); diff --git a/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java b/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java index 038f99c..4741a1b 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java @@ -22,6 +22,11 @@ import com.thatgravyboat.skyblockhud.textures.Textures; import com.thatgravyboat.skyblockhud.tracker.TrackerFileLoader; import com.thatgravyboat.skyblockhud.tracker.TrackerHandler; import com.thatgravyboat.skyblockhud.utils.Utils; +import java.awt.*; +import java.awt.datatransfer.StringSelection; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.util.Set; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.resources.IReloadableResourceManager; @@ -42,12 +47,6 @@ import net.minecraftforge.fml.common.gameevent.TickEvent; import net.minecraftforge.fml.common.network.FMLNetworkEvent; import org.lwjgl.input.Keyboard; -import java.awt.*; -import java.awt.datatransfer.StringSelection; -import java.io.*; -import java.nio.charset.StandardCharsets; -import java.util.Set; - @Mod(modid = SkyblockHud.MODID, version = SkyblockHud.VERSION) public class SkyblockHud { diff --git a/src/main/java/com/thatgravyboat/skyblockhud/api/LeaderboardGetter.java b/src/main/java/com/thatgravyboat/skyblockhud/api/LeaderboardGetter.java index 2a71c8b..2312910 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.api.events.SidebarLineUpdateEvent; import com.thatgravyboat.skyblockhud.api.events.SidebarPostEvent; import com.thatgravyboat.skyblockhud.api.events.SidebarPreGetEvent; import com.thatgravyboat.skyblockhud.utils.Utils; +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 cachedScores = new HashMap<>(); diff --git a/src/main/java/com/thatgravyboat/skyblockhud/core/config/gui/GuiOptionEditorDraggableList.java b/src/main/java/com/thatgravyboat/skyblockhud/core/config/gui/GuiOptionEditorDraggableList.java index 5c5d774..1e6fa0c 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/core/config/gui/GuiOptionEditorDraggableList.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/core/config/gui/GuiOptionEditorDraggableList.java @@ -1,10 +1,15 @@ package com.thatgravyboat.skyblockhud.core.config.gui; +import static com.thatgravyboat.skyblockhud.GuiTextures.DELETE; +import static com.thatgravyboat.skyblockhud.GuiTextures.button_tex; + import com.thatgravyboat.skyblockhud.core.config.struct.ConfigProcessor; import com.thatgravyboat.skyblockhud.core.util.lerp.LerpUtils; import com.thatgravyboat.skyblockhud.core.util.render.RenderUtils; import com.thatgravyboat.skyblockhud.core.util.render.TextRenderUtils; import com.thatgravyboat.skyblockhud.utils.Utils; +import java.util.ArrayList; +import java.util.List; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.Gui; @@ -14,12 +19,6 @@ import net.minecraft.util.EnumChatFormatting; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; -import java.util.ArrayList; -import java.util.List; - -import static com.thatgravyboat.skyblockhud.GuiTextures.DELETE; -import static com.thatgravyboat.skyblockhud.GuiTextures.button_tex; - public class GuiOptionEditorDraggableList extends GuiOptionEditor { private String[] exampleText; diff --git a/src/main/java/com/thatgravyboat/skyblockhud/core/config/gui/GuiPositionEditor.java b/src/main/java/com/thatgravyboat/skyblockhud/core/config/gui/GuiPositionEditor.java index 4f62765..7c16530 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/core/config/gui/GuiPositionEditor.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/core/config/gui/GuiPositionEditor.java @@ -1,7 +1,7 @@ package com.thatgravyboat.skyblockhud.core.config.gui; -import com.thatgravyboat.skyblockhud.utils.Utils; import com.thatgravyboat.skyblockhud.core.config.Position; +import com.thatgravyboat.skyblockhud.utils.Utils; import java.io.IOException; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; diff --git a/src/main/java/com/thatgravyboat/skyblockhud/core/util/GuiElementSlider.java b/src/main/java/com/thatgravyboat/skyblockhud/core/util/GuiElementSlider.java index 536d72f..eb5fe6f 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/core/util/GuiElementSlider.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/core/util/GuiElementSlider.java @@ -1,17 +1,16 @@ package com.thatgravyboat.skyblockhud.core.util; +import static com.thatgravyboat.skyblockhud.GuiTextures.*; + import com.thatgravyboat.skyblockhud.core.GuiElement; import com.thatgravyboat.skyblockhud.utils.Utils; +import java.util.function.Consumer; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.renderer.GlStateManager; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; -import java.util.function.Consumer; - -import static com.thatgravyboat.skyblockhud.GuiTextures.*; - public class GuiElementSlider extends GuiElement { public int x; diff --git a/src/main/java/com/thatgravyboat/skyblockhud/dungeons/DungeonHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/dungeons/DungeonHandler.java index 66f4d09..5a5e4ec 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/dungeons/DungeonHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/dungeons/DungeonHandler.java @@ -5,12 +5,11 @@ import com.thatgravyboat.skyblockhud.api.events.SidebarPostEvent; import com.thatgravyboat.skyblockhud.location.LocationHandler; import com.thatgravyboat.skyblockhud.location.Locations; import com.thatgravyboat.skyblockhud.utils.Utils; -import net.minecraft.client.Minecraft; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; - import java.util.HashMap; import java.util.regex.Matcher; import java.util.regex.Pattern; +import net.minecraft.client.Minecraft; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class DungeonHandler { diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/BossbarHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/BossbarHandler.java index 6d00789..1467b48 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/BossbarHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/BossbarHandler.java @@ -1,10 +1,10 @@ package com.thatgravyboat.skyblockhud.handlers; import com.thatgravyboat.skyblockhud.SkyblockHud; -import com.thatgravyboat.skyblockhud.utils.Utils; import com.thatgravyboat.skyblockhud.location.LocationHandler; import com.thatgravyboat.skyblockhud.location.Locations; import com.thatgravyboat.skyblockhud.location.MinesHandler; +import com.thatgravyboat.skyblockhud.utils.Utils; import net.minecraft.entity.boss.BossStatus; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.fml.common.eventhandler.EventPriority; diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java index dff03b1..bab57f8 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java @@ -3,12 +3,12 @@ package com.thatgravyboat.skyblockhud.handlers; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.thatgravyboat.skyblockhud.SkyblockHud; -import com.thatgravyboat.skyblockhud.utils.Utils; import com.thatgravyboat.skyblockhud.api.events.LocationChangeEvent; import com.thatgravyboat.skyblockhud.commands.SimpleCommand; import com.thatgravyboat.skyblockhud.location.LocationCategory; import com.thatgravyboat.skyblockhud.location.LocationHandler; import com.thatgravyboat.skyblockhud.location.Locations; +import com.thatgravyboat.skyblockhud.utils.Utils; import java.awt.*; import java.awt.datatransfer.StringSelection; import java.util.Arrays; diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/CurrencyHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/CurrencyHandler.java index c7bd596..482dbe1 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/CurrencyHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/CurrencyHandler.java @@ -1,8 +1,8 @@ package com.thatgravyboat.skyblockhud.handlers; -import com.thatgravyboat.skyblockhud.utils.Utils; import com.thatgravyboat.skyblockhud.api.events.SidebarLineUpdateEvent; import com.thatgravyboat.skyblockhud.api.events.SidebarPostEvent; +import com.thatgravyboat.skyblockhud.utils.Utils; import java.math.RoundingMode; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/MapHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/MapHandler.java index fb1bd13..937a5a4 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/MapHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/MapHandler.java @@ -1,5 +1,7 @@ package com.thatgravyboat.skyblockhud.handlers; +import static com.thatgravyboat.skyblockhud.GuiTextures.mapOverlay; + import com.thatgravyboat.skyblockhud.SkyblockHud; import com.thatgravyboat.skyblockhud.config.KeyBindings; import com.thatgravyboat.skyblockhud.config.SBHConfig; @@ -8,6 +10,10 @@ import com.thatgravyboat.skyblockhud.handlers.mapicons.DwarvenIcons; import com.thatgravyboat.skyblockhud.handlers.mapicons.HubIcons; import com.thatgravyboat.skyblockhud.location.LocationHandler; import com.thatgravyboat.skyblockhud.utils.Utils; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import javax.vecmath.Vector2f; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiScreen; @@ -20,13 +26,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import org.lwjgl.opengl.GL11; -import javax.vecmath.Vector2f; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import static com.thatgravyboat.skyblockhud.GuiTextures.mapOverlay; - public class MapHandler { public enum MapIconTypes { @@ -59,11 +58,7 @@ public class MapHandler { public boolean cantRender() { SBHConfig.Map mapConfig = SkyblockHud.config.map; - if (mapConfig.showInfoIcons && type.equals(MapIconTypes.INFO)) return false; - else if (mapConfig.showMiscIcons && type.equals(MapIconTypes.MISC)) return false; - else if (mapConfig.showNpcIcons && type.equals(MapIconTypes.NPC)) return false; - else if (mapConfig.showQuestIcons && type.equals(MapIconTypes.QUEST)) return false; - else return (!mapConfig.showShopIcons || !type.equals(MapIconTypes.SHOPS)); + if (mapConfig.showInfoIcons && type.equals(MapIconTypes.INFO)) return false; else if (mapConfig.showMiscIcons && type.equals(MapIconTypes.MISC)) return false; else if (mapConfig.showNpcIcons && type.equals(MapIconTypes.NPC)) return false; else if (mapConfig.showQuestIcons && type.equals(MapIconTypes.QUEST)) return false; else return (!mapConfig.showShopIcons || !type.equals(MapIconTypes.SHOPS)); } } diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/NpcDialogue.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/NpcDialogue.java index 59a5444..1e67034 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/NpcDialogue.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/NpcDialogue.java @@ -5,8 +5,8 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.thatgravyboat.skyblockhud.SkyblockHud; -import com.thatgravyboat.skyblockhud.utils.Utils; import com.thatgravyboat.skyblockhud.textures.Textures; +import com.thatgravyboat.skyblockhud.utils.Utils; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/SlayerHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/SlayerHandler.java index 565fc72..4a1f4e6 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/SlayerHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/SlayerHandler.java @@ -1,9 +1,9 @@ package com.thatgravyboat.skyblockhud.handlers; -import com.thatgravyboat.skyblockhud.utils.Utils; import com.thatgravyboat.skyblockhud.api.events.SidebarLineUpdateEvent; import com.thatgravyboat.skyblockhud.api.events.SidebarPostEvent; import com.thatgravyboat.skyblockhud.api.events.SkyBlockEntityKilled; +import com.thatgravyboat.skyblockhud.utils.Utils; import java.util.Arrays; import java.util.Locale; import java.util.regex.Matcher; diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/mapicons/DwarvenIcons.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/mapicons/DwarvenIcons.java index b9c0185..211ed4b 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/mapicons/DwarvenIcons.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/mapicons/DwarvenIcons.java @@ -2,11 +2,10 @@ package com.thatgravyboat.skyblockhud.handlers.mapicons; import com.thatgravyboat.skyblockhud.handlers.MapHandler; import com.thatgravyboat.skyblockhud.utils.ComponentBuilder; -import net.minecraft.util.ResourceLocation; - -import javax.vecmath.Vector2f; import java.util.ArrayList; import java.util.List; +import javax.vecmath.Vector2f; +import net.minecraft.util.ResourceLocation; public class DwarvenIcons { diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/mapicons/HubIcons.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/mapicons/HubIcons.java index 0d0d40a..7de7d92 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/mapicons/HubIcons.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/mapicons/HubIcons.java @@ -2,11 +2,10 @@ package com.thatgravyboat.skyblockhud.handlers.mapicons; import com.thatgravyboat.skyblockhud.handlers.MapHandler; import com.thatgravyboat.skyblockhud.utils.ComponentBuilder; -import net.minecraft.util.ResourceLocation; - -import javax.vecmath.Vector2f; import java.util.ArrayList; import java.util.List; +import javax.vecmath.Vector2f; +import net.minecraft.util.ResourceLocation; public class HubIcons { diff --git a/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java index 11fb40e..cc6668a 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/location/IslandHandler.java @@ -1,8 +1,8 @@ package com.thatgravyboat.skyblockhud.location; -import com.thatgravyboat.skyblockhud.utils.Utils; import com.thatgravyboat.skyblockhud.api.events.ProfileSwitchedEvent; import com.thatgravyboat.skyblockhud.api.events.SidebarLineUpdateEvent; +import com.thatgravyboat.skyblockhud.utils.Utils; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class IslandHandler { diff --git a/src/main/java/com/thatgravyboat/skyblockhud/location/LocationCategory.java b/src/main/java/com/thatgravyboat/skyblockhud/location/LocationCategory.java index 4d60baa..b6ef6fb 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/location/LocationCategory.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/location/LocationCategory.java @@ -1,10 +1,10 @@ package com.thatgravyboat.skyblockhud.location; +import static com.thatgravyboat.skyblockhud.handlers.MapHandler.Maps; + import com.thatgravyboat.skyblockhud.SkyblockHud; import com.thatgravyboat.skyblockhud.handlers.MapHandler; -import static com.thatgravyboat.skyblockhud.handlers.MapHandler.Maps; - public enum LocationCategory { ERROR("error", 34), ISLAND("island", 43), diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java index d8cd95e..eaa1b5a 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java @@ -1,5 +1,7 @@ package com.thatgravyboat.skyblockhud.mixins; +import static net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType.*; + import com.thatgravyboat.skyblockhud.SkyblockHud; import com.thatgravyboat.skyblockhud.overlay.MiningHud; import com.thatgravyboat.skyblockhud.utils.Utils; @@ -14,8 +16,6 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import static net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType.*; - @Mixin(GuiIngameForge.class) public class MixinGuiIngameForge { diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/DungeonOverlay.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/DungeonOverlay.java index e680bbb..9bcf96a 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/DungeonOverlay.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/DungeonOverlay.java @@ -1,8 +1,6 @@ package com.thatgravyboat.skyblockhud.overlay; import com.thatgravyboat.skyblockhud.SkyblockHud; -import com.thatgravyboat.skyblockhud.utils.SpecialColour; -import com.thatgravyboat.skyblockhud.utils.Utils; import com.thatgravyboat.skyblockhud.config.SBHConfig; import com.thatgravyboat.skyblockhud.core.config.Position; import com.thatgravyboat.skyblockhud.dungeons.Classes; @@ -12,6 +10,8 @@ import com.thatgravyboat.skyblockhud.handlers.BossbarHandler; import com.thatgravyboat.skyblockhud.location.LocationHandler; import com.thatgravyboat.skyblockhud.location.Locations; import com.thatgravyboat.skyblockhud.textures.Textures; +import com.thatgravyboat.skyblockhud.utils.SpecialColour; +import com.thatgravyboat.skyblockhud.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.Gui; diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java index 418b4e0..a3aab50 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java @@ -1,9 +1,9 @@ package com.thatgravyboat.skyblockhud.overlay; import com.thatgravyboat.skyblockhud.SkyblockHud; -import com.thatgravyboat.skyblockhud.utils.Utils; import com.thatgravyboat.skyblockhud.core.config.Position; import com.thatgravyboat.skyblockhud.textures.Textures; +import com.thatgravyboat.skyblockhud.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.renderer.GlStateManager; diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java index 40a3b31..3c39877 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java @@ -1,7 +1,6 @@ package com.thatgravyboat.skyblockhud.overlay; import com.thatgravyboat.skyblockhud.SkyblockHud; -import com.thatgravyboat.skyblockhud.utils.Utils; import com.thatgravyboat.skyblockhud.handlers.BossbarHandler; import com.thatgravyboat.skyblockhud.handlers.CurrencyHandler; import com.thatgravyboat.skyblockhud.handlers.SlayerHandler; @@ -10,6 +9,7 @@ import com.thatgravyboat.skyblockhud.location.*; import com.thatgravyboat.skyblockhud.seasons.Season; import com.thatgravyboat.skyblockhud.seasons.SeasonDateHandler; import com.thatgravyboat.skyblockhud.textures.Textures; +import com.thatgravyboat.skyblockhud.utils.Utils; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.Locale; diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java index 3261daf..1c3cbb0 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java @@ -2,10 +2,10 @@ package com.thatgravyboat.skyblockhud.overlay; import com.mojang.realmsclient.gui.ChatFormatting; import com.thatgravyboat.skyblockhud.SkyblockHud; -import com.thatgravyboat.skyblockhud.utils.Utils; import com.thatgravyboat.skyblockhud.core.config.Position; import com.thatgravyboat.skyblockhud.handlers.HeldItemHandler; import com.thatgravyboat.skyblockhud.textures.Textures; +import com.thatgravyboat.skyblockhud.utils.Utils; import java.text.DecimalFormat; import java.text.NumberFormat; import net.minecraft.client.Minecraft; diff --git a/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java b/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java index 847cdc9..5027704 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java @@ -4,6 +4,8 @@ import com.thatgravyboat.skyblockhud.SkyblockHud; import com.thatgravyboat.skyblockhud.overlay.MiningHud; import com.thatgravyboat.skyblockhud.overlay.RPGHud; import com.thatgravyboat.skyblockhud.utils.Utils; +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; @@ -11,9 +13,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 = ""; diff --git a/src/main/java/com/thatgravyboat/skyblockhud/seasons/SeasonDateHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/seasons/SeasonDateHandler.java index 45241c5..02cc490 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/seasons/SeasonDateHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/seasons/SeasonDateHandler.java @@ -2,9 +2,8 @@ package com.thatgravyboat.skyblockhud.seasons; import com.thatgravyboat.skyblockhud.api.events.SidebarLineUpdateEvent; import com.thatgravyboat.skyblockhud.utils.Utils; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; - import java.util.regex.Pattern; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class SeasonDateHandler { diff --git a/src/main/java/com/thatgravyboat/skyblockhud/textures/Textures.java b/src/main/java/com/thatgravyboat/skyblockhud/textures/Textures.java index c80b72f..c77bd40 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/textures/Textures.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/textures/Textures.java @@ -6,15 +6,14 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.thatgravyboat.skyblockhud.SkyblockHud; -import net.minecraft.client.resources.IResource; -import net.minecraft.client.resources.IResourceManager; -import net.minecraft.client.resources.IResourceManagerReloadListener; -import net.minecraft.util.ResourceLocation; - import java.io.BufferedReader; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.util.List; +import net.minecraft.client.resources.IResource; +import net.minecraft.client.resources.IResourceManager; +import net.minecraft.client.resources.IResourceManagerReloadListener; +import net.minecraft.util.ResourceLocation; public class Textures implements IResourceManagerReloadListener { diff --git a/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java index 1b54011..baf9648 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java @@ -6,6 +6,7 @@ import com.thatgravyboat.skyblockhud.core.config.Position; import com.thatgravyboat.skyblockhud.location.LocationHandler; import com.thatgravyboat.skyblockhud.location.Locations; import com.thatgravyboat.skyblockhud.utils.Utils; +import java.util.*; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.renderer.GlStateManager; @@ -15,8 +16,6 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import java.util.*; - public class TrackerHandler extends Gui { public static Set trackerObjects = new HashSet<>(); diff --git a/src/main/java/com/thatgravyboat/skyblockhud/utils/Utils.java b/src/main/java/com/thatgravyboat/skyblockhud/utils/Utils.java index 2a4016f..71c6266 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/utils/Utils.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/utils/Utils.java @@ -1,6 +1,14 @@ package com.thatgravyboat.skyblockhud.utils; import com.thatgravyboat.skyblockhud.SkyblockHud; +import java.math.RoundingMode; +import java.nio.FloatBuffer; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.Locale; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.gui.FontRenderer; @@ -22,15 +30,6 @@ import org.lwjgl.BufferUtils; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL14; -import java.math.RoundingMode; -import java.nio.FloatBuffer; -import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedList; -import java.util.Locale; - public class Utils { private static LinkedList guiScales = new LinkedList<>(); -- cgit