diff options
author | ThatGravyBoat <ThatGravyBoat@users.noreply.github.com> | 2021-07-13 04:22:16 +0000 |
---|---|---|
committer | GitHub Action <actions@github.com> | 2021-07-13 04:22:16 +0000 |
commit | b3b16e4c82ad1e66f5564c806563dfc23658fdef (patch) | |
tree | 676f37e897537a4820204c30b52b8bc9379c324a /src/main/java/com/thatgravyboat/skyblockhud/handlers | |
parent | 3bd212839e1d3c497a840221a0c149451967467e (diff) | |
download | SkyblockHud-Death-Defied-b3b16e4c82ad1e66f5564c806563dfc23658fdef.tar.gz SkyblockHud-Death-Defied-b3b16e4c82ad1e66f5564c806563dfc23658fdef.tar.bz2 SkyblockHud-Death-Defied-b3b16e4c82ad1e66f5564c806563dfc23658fdef.zip |
Prettified Code!
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/handlers')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java | 17 | ||||
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/handlers/MapHandler.java | 4 |
2 files changed, 10 insertions, 11 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java index 0932ab1..d6e4fd6 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java @@ -43,12 +43,11 @@ public class CrystalWaypoints { public void onLocationChange(LocationChangeEvent event) { if (!event.newLocation.getCategory().equals(LocationCategory.CRYSTALHOLLOWS)) { waypoints.clear(); + } else if (!waypoints.containsKey("Crystal Nucleus") && SkyblockHud.config.mining.autoWaypoint) { + waypoints.put("Crystal Nucleus", new BlockPos(512.5, 106.5, 512.5)); } - else if (!waypoints.containsKey("Crystal Nucleus") && SkyblockHud.config.mining.autoWaypoint){ - waypoints.put("Crystal Nucleus", new BlockPos(512.5,106.5,512.5)); - } - if (IMPORTANT_WAYPOINTS.contains(event.newLocation) && SkyblockHud.config.mining.autoWaypoint){ - if (!waypoints.containsKey(event.newLocation.getDisplayName())){ + if (IMPORTANT_WAYPOINTS.contains(event.newLocation) && SkyblockHud.config.mining.autoWaypoint) { + if (!waypoints.containsKey(event.newLocation.getDisplayName())) { waypoints.put(event.newLocation.getDisplayName(), Minecraft.getMinecraft().thePlayer.getPosition()); } } @@ -100,7 +99,7 @@ public class CrystalWaypoints { } else { sbhMessage(sender, "Waypoint already exists!"); } - }catch (Exception e){ + } catch (Exception e) { sbhMessage(sender, "Error!"); } } @@ -111,7 +110,7 @@ public class CrystalWaypoints { sbhMessage(sender, "No waypoint with that name!"); break; } - StringSelection clipboard = new StringSelection(name + " : ("+pos.getX()+"/"+pos.getY()+"/"+pos.getZ()+")"); + StringSelection clipboard = new StringSelection(name + " : (" + pos.getX() + "/" + pos.getY() + "/" + pos.getZ() + ")"); Toolkit.getDefaultToolkit().getSystemClipboard().setContents(clipboard, clipboard); break; } @@ -126,7 +125,7 @@ public class CrystalWaypoints { if (args.length == 1) { return getListOfStringsMatchingLastWord(args, Lists.newArrayList("add", "clear", "remove", "copy", "addat")); } - if (args.length > 1 && args[0].equalsIgnoreCase("addat")){ + if (args.length > 1 && args[0].equalsIgnoreCase("addat")) { return func_175771_a(args, 1, pos); } return null; @@ -135,7 +134,7 @@ public class CrystalWaypoints { ); } - private static void sbhMessage(ICommandSender sender, String message){ + private static void sbhMessage(ICommandSender sender, String message) { sender.addChatMessage(new ChatComponentText("[" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + "SkyBlockHud" + EnumChatFormatting.RESET + "] : " + EnumChatFormatting.GRAY + message)); } } diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/MapHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/MapHandler.java index e7143a9..bf38d49 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; @@ -24,8 +26,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import org.lwjgl.opengl.GL11; -import static com.thatgravyboat.skyblockhud.GuiTextures.mapOverlay; - public class MapHandler { public enum MapIconTypes { |