diff options
author | ThatGravyBoat <ThatGravyBoat@users.noreply.github.com> | 2021-07-11 21:28:26 +0000 |
---|---|---|
committer | GitHub Action <actions@github.com> | 2021-07-11 21:28:26 +0000 |
commit | e616a0910bdf7f4540f2814a35c1b7eefa9cd59d (patch) | |
tree | e1ec5d961ef3a0b2337f9794176b3fac3ae299d2 /src/main/java/com/thatgravyboat/skyblockhud/handlers | |
parent | 3a1917c8a0af4157cc1e6d5f3986e89377f245d8 (diff) | |
download | SkyblockHud-Death-Defied-e616a0910bdf7f4540f2814a35c1b7eefa9cd59d.tar.gz SkyblockHud-Death-Defied-e616a0910bdf7f4540f2814a35c1b7eefa9cd59d.tar.bz2 SkyblockHud-Death-Defied-e616a0910bdf7f4540f2814a35c1b7eefa9cd59d.zip |
Prettified Code!
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/handlers')
4 files changed, 16 insertions, 19 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/BossbarHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/BossbarHandler.java index 7cc6061..21e98fe 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/BossbarHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/BossbarHandler.java @@ -2,9 +2,9 @@ package com.thatgravyboat.skyblockhud.handlers; import com.thatgravyboat.skyblockhud.SkyblockHud; import com.thatgravyboat.skyblockhud.Utils; -import com.thatgravyboat.skyblockhud.location.MinesHandler; import com.thatgravyboat.skyblockhud.location.LocationHandler; import com.thatgravyboat.skyblockhud.location.Locations; +import com.thatgravyboat.skyblockhud.location.MinesHandler; 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/HeldItemHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/HeldItemHandler.java index c44c8bc..2feef38 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/HeldItemHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/HeldItemHandler.java @@ -1,16 +1,15 @@ package com.thatgravyboat.skyblockhud.handlers; -import net.minecraft.client.gui.Gui; -import net.minecraft.item.ItemStack; - import java.util.regex.Matcher; import java.util.regex.Pattern; +import net.minecraft.client.gui.Gui; +import net.minecraft.item.ItemStack; public class HeldItemHandler extends Gui { private static final Pattern MANA_COST_REGEX = Pattern.compile("Mana Cost: \u00A73([0-9]+)"); - public static boolean hasManaCost(ItemStack stack){ + public static boolean hasManaCost(ItemStack stack) { if (stack == null) return false; if (!stack.hasTagCompound()) return false; if (!stack.getTagCompound().hasKey("display")) return false; @@ -19,13 +18,13 @@ public class HeldItemHandler extends Gui { return MANA_COST_REGEX.matcher(lore).find(); } - public static int getManaCost(ItemStack stack){ + public static int getManaCost(ItemStack stack) { String lore = stack.getTagCompound().getCompoundTag("display").getTagList("Lore", 8).toString(); Matcher matcher = MANA_COST_REGEX.matcher(lore); - if (matcher.find()){ - try { - return Integer.parseInt(matcher.group(1)); - }catch (Exception ignored){} + if (matcher.find()) { + try { + return Integer.parseInt(matcher.group(1)); + } catch (Exception ignored) {} } return 0; } diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/MapHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/MapHandler.java index 4491e9d..64cc7dc 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.Utils; import com.thatgravyboat.skyblockhud.config.KeyBindings; @@ -8,6 +10,10 @@ import com.thatgravyboat.skyblockhud.core.config.Position; import com.thatgravyboat.skyblockhud.handlers.mapicons.DwarvenIcons; import com.thatgravyboat.skyblockhud.handlers.mapicons.HubIcons; import com.thatgravyboat.skyblockhud.location.LocationHandler; +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 { diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/SlayerHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/SlayerHandler.java index dcdc10e..67bde54 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/SlayerHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/SlayerHandler.java @@ -3,12 +3,11 @@ package com.thatgravyboat.skyblockhud.handlers; import com.thatgravyboat.skyblockhud.Utils; import com.thatgravyboat.skyblockhud.api.events.SidebarLineUpdateEvent; import com.thatgravyboat.skyblockhud.api.events.SidebarPostEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; - import java.util.Arrays; import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class SlayerHandler { |