From e616a0910bdf7f4540f2814a35c1b7eefa9cd59d Mon Sep 17 00:00:00 2001 From: ThatGravyBoat Date: Sun, 11 Jul 2021 21:28:26 +0000 Subject: Prettified Code! --- .../com/thatgravyboat/skyblockhud/location/LocationCategory.java | 5 ++--- .../com/thatgravyboat/skyblockhud/location/LocationHandler.java | 3 +-- .../com/thatgravyboat/skyblockhud/location/MinesHandler.java | 9 ++++----- 3 files changed, 7 insertions(+), 10 deletions(-) (limited to 'src/main/java/com/thatgravyboat/skyblockhud/location') diff --git a/src/main/java/com/thatgravyboat/skyblockhud/location/LocationCategory.java b/src/main/java/com/thatgravyboat/skyblockhud/location/LocationCategory.java index f37a22d..cf93295 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/location/LocationCategory.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/location/LocationCategory.java @@ -1,9 +1,9 @@ package com.thatgravyboat.skyblockhud.location; -import com.thatgravyboat.skyblockhud.handlers.MapHandler; - import static com.thatgravyboat.skyblockhud.handlers.MapHandler.Maps; +import com.thatgravyboat.skyblockhud.handlers.MapHandler; + public enum LocationCategory { ERROR("error", 34), ISLAND("island", 43), @@ -50,5 +50,4 @@ public enum LocationCategory { public boolean isMiningCategory() { return this == LocationCategory.DWARVENMINES || this == LocationCategory.CRYSTALHOLLOWS; } - } diff --git a/src/main/java/com/thatgravyboat/skyblockhud/location/LocationHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/location/LocationHandler.java index 6abc7b7..d4a0d0e 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/location/LocationHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/location/LocationHandler.java @@ -1,9 +1,8 @@ package com.thatgravyboat.skyblockhud.location; import com.thatgravyboat.skyblockhud.api.events.SidebarLineUpdateEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; - import java.util.Locale; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class LocationHandler { diff --git a/src/main/java/com/thatgravyboat/skyblockhud/location/MinesHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/location/MinesHandler.java index 1e1a065..d8f9d7b 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/location/MinesHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/location/MinesHandler.java @@ -3,13 +3,12 @@ package com.thatgravyboat.skyblockhud.location; import com.thatgravyboat.skyblockhud.api.events.SidebarLineUpdateEvent; import com.thatgravyboat.skyblockhud.api.events.SidebarPostEvent; import com.thatgravyboat.skyblockhud.overlay.MiningHud; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; - import java.math.RoundingMode; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.Arrays; import java.util.Locale; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class MinesHandler { @@ -81,7 +80,7 @@ public class MinesHandler { @SubscribeEvent public void onSidebarLineUpdate(SidebarLineUpdateEvent event) { - if (event.formattedLine.toLowerCase().contains("heat")){ + if (event.formattedLine.toLowerCase().contains("heat")) { try { MiningHud.setHeat(Integer.parseInt(event.formattedLine.toLowerCase().replace("heat:", "").trim())); } catch (Exception ignored) {} @@ -106,7 +105,7 @@ public class MinesHandler { if (event.formattedLine.equalsIgnoreCase("wind compass")) { MinesHandler.currentEvent = Event.WIND; } - if (event.formattedLine.equalsIgnoreCase("nearby players")){ + if (event.formattedLine.equalsIgnoreCase("nearby players")) { MinesHandler.currentEvent = Event.TOGETHER; try { MinesHandler.eventProgress = Integer.parseInt(event.formattedLine.toLowerCase().replace("nearby players", "")); @@ -150,7 +149,7 @@ public class MinesHandler { MinesHandler.eventProgress = 0; MinesHandler.eventMax = 0; } - if (!arrayString.toLowerCase().contains("heat:")){ + if (!arrayString.toLowerCase().contains("heat:")) { MiningHud.setHeat(0); } } -- cgit