aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThatGravyBoat <ThatGravyBoat@users.noreply.github.com>2021-07-17 03:56:58 +0000
committerGitHub Action <actions@github.com>2021-07-17 03:56:58 +0000
commitbaf3b8aa15cbd2dc0fcb4a80707557c44ee30c16 (patch)
treeea5e7062f7f808cb918e354068bbf9a669ad14f7
parente364de18cbcbc9f334d890703812876789374bab (diff)
downloadSkyblockHud-Death-Defied-baf3b8aa15cbd2dc0fcb4a80707557c44ee30c16.tar.gz
SkyblockHud-Death-Defied-baf3b8aa15cbd2dc0fcb4a80707557c44ee30c16.tar.bz2
SkyblockHud-Death-Defied-baf3b8aa15cbd2dc0fcb4a80707557c44ee30c16.zip
Prettified Code!
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java16
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/core/config/gui/GuiOptionEditorDraggableList.java6
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/handlers/NpcDialogue.java6
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/location/LocationCategory.java7
4 files changed, 10 insertions, 25 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java b/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java
index 27236f4..5a6acfc 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java
@@ -301,21 +301,7 @@ public class SBHConfig extends Config {
@Expose
@ConfigOption(name = "Map Locations", desc = "Remove a location from this list if you would like the map to not show up in that location. This is so you can use other mods maps.")
- @ConfigEditorDraggableList(exampleText = {
- "HUB",
- "BARN",
- "MUSHROOMDESERT",
- "GOLDMINE (No Map Yet)",
- "DEEPCAVERNS (No Map Yet)",
- "SPIDERSDEN",
- "PARK",
- "FORTRESS",
- "DUNGEONHUB (No Map Yet)",
- "JERRY (No Map Yet)",
- "THEEND (No Map Yet)",
- "DWARVENMINES",
- "CRYSTALHOLLOWS (No Map Yet)"
- })
+ @ConfigEditorDraggableList(exampleText = { "HUB", "BARN", "MUSHROOMDESERT", "GOLDMINE (No Map Yet)", "DEEPCAVERNS (No Map Yet)", "SPIDERSDEN", "PARK", "FORTRESS", "DUNGEONHUB (No Map Yet)", "JERRY (No Map Yet)", "THEEND (No Map Yet)", "DWARVENMINES", "CRYSTALHOLLOWS (No Map Yet)" })
public List<Integer> mapLocations = new ArrayList<>(Arrays.asList(0, 1, 2, 5, 6, 7, 11));
@Expose
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 36c0ec3..4b61aa4 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,5 +1,8 @@
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.Utils;
import com.thatgravyboat.skyblockhud.core.config.struct.ConfigProcessor;
import com.thatgravyboat.skyblockhud.core.util.lerp.LerpUtils;
@@ -16,9 +19,6 @@ import net.minecraft.util.EnumChatFormatting;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
-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/handlers/NpcDialogue.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/NpcDialogue.java
index 1db9d1a..1f56526 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/NpcDialogue.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/NpcDialogue.java
@@ -1,5 +1,7 @@
package com.thatgravyboat.skyblockhud.handlers;
+import static com.thatgravyboat.skyblockhud.GuiTextures.dialogue;
+
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
@@ -25,8 +27,6 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
-import static com.thatgravyboat.skyblockhud.GuiTextures.dialogue;
-
public class NpcDialogue implements IResourceManagerReloadListener {
public static final Pattern NPC_DIALOGUE_REGEX = Pattern.compile("\\[NPC] (.*): (.*)");
@@ -90,7 +90,7 @@ public class NpcDialogue implements IResourceManagerReloadListener {
String npcID = currentNpc.toLowerCase(Locale.ENGLISH).replace(" ", "_");
- if (NPCS.containsKey(npcID)){
+ if (NPCS.containsKey(npcID)) {
mc.renderEngine.bindTexture(NPCS.get(npcID));
Gui.drawModalRectWithCustomSizedTexture(x + 4, y + 4, 0, 0, 32, 60, 128, 128);
}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/location/LocationCategory.java b/src/main/java/com/thatgravyboat/skyblockhud/location/LocationCategory.java
index 65256ac..f54999c 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),
@@ -45,8 +45,7 @@ public enum LocationCategory {
}
public MapHandler.Maps getMap() {
- if (this.map != null && SkyblockHud.config.map.mapLocations.contains(this.ordinal() - 2)) return this.map;
- else return null;
+ if (this.map != null && SkyblockHud.config.map.mapLocations.contains(this.ordinal() - 2)) return this.map; else return null;
}
public boolean isMiningCategory() {