aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/GuiTextures.java1
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java2
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/core/config/annotations/ConfigEditorStyle.java3
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/core/config/gui/GuiOptionEditorStyle.java3
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/textures/TextureObject.java14
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/textures/Textures.java4
6 files changed, 14 insertions, 13 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/GuiTextures.java b/src/main/java/com/thatgravyboat/skyblockhud/GuiTextures.java
index 69faf06..bb49c9c 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/GuiTextures.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/GuiTextures.java
@@ -30,5 +30,4 @@ public class GuiTextures {
public static final ResourceLocation slider_button_new = new ResourceLocation("skyblockhud:core/slider/slider_button.png");
public static final ResourceLocation mapOverlay = new ResourceLocation("skyblockhud", "maps/map_overlay.png");
-
}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java b/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java
index 74ccc0e..d84d52d 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java
@@ -109,7 +109,7 @@ public class SBHConfig extends Config {
@Expose
@ConfigOption(name = "Texture Styles", desc = "If this list only contains 1 thing that means your texture pack doesnt support styles")
- @ConfigEditorStyle()
+ @ConfigEditorStyle
public int style = 0;
@Expose
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/core/config/annotations/ConfigEditorStyle.java b/src/main/java/com/thatgravyboat/skyblockhud/core/config/annotations/ConfigEditorStyle.java
index 2a208a0..a02a12d 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/core/config/annotations/ConfigEditorStyle.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/core/config/annotations/ConfigEditorStyle.java
@@ -7,4 +7,5 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
-public @interface ConfigEditorStyle {}
+public @interface ConfigEditorStyle {
+}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/core/config/gui/GuiOptionEditorStyle.java b/src/main/java/com/thatgravyboat/skyblockhud/core/config/gui/GuiOptionEditorStyle.java
index e383db2..a2fd17a 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/core/config/gui/GuiOptionEditorStyle.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/core/config/gui/GuiOptionEditorStyle.java
@@ -8,7 +8,7 @@ import org.lwjgl.input.Mouse;
public class GuiOptionEditorStyle extends GuiOptionEditorDropdown {
public GuiOptionEditorStyle(ConfigProcessor.ProcessedOption option, int selected) {
- super(option, Textures.styles.stream().map(t ->t.displayName).collect(Collectors.toList()).toArray(new String[]{}), selected, true);
+ super(option, Textures.styles.stream().map(t -> t.displayName).collect(Collectors.toList()).toArray(new String[] {}), selected, true);
}
@Override
@@ -39,5 +39,4 @@ public class GuiOptionEditorStyle extends GuiOptionEditorDropdown {
return false;
}
-
}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/textures/TextureObject.java b/src/main/java/com/thatgravyboat/skyblockhud/textures/TextureObject.java
index 10495f5..3af2ac1 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/textures/TextureObject.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/textures/TextureObject.java
@@ -14,24 +14,26 @@ public class TextureObject {
public ResourceLocation dungeon = resource("dungeon.png");
public ResourceLocation dialogue = resource("dialogue.png");
- public TextureObject(String displayName){
+ public TextureObject(String displayName) {
this.displayName = displayName;
}
public static TextureObject decode(JsonObject json) {
TextureObject textureObject = new TextureObject(json.get("displayName").getAsString());
- Arrays.stream(textureObject.getClass().getDeclaredFields())
- .filter(field -> field.getType().equals(ResourceLocation.class)).forEach(field -> {
+ Arrays
+ .stream(textureObject.getClass().getDeclaredFields())
+ .filter(field -> field.getType().equals(ResourceLocation.class))
+ .forEach(
+ field -> {
try {
field.set(textureObject, new ResourceLocation(json.get(field.getName()).getAsString()));
} catch (Exception ignored) {}
}
- );
+ );
return textureObject;
}
-
- private static ResourceLocation resource(String path){
+ private static ResourceLocation resource(String path) {
return new ResourceLocation("skyblockhud", path);
}
}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/textures/Textures.java b/src/main/java/com/thatgravyboat/skyblockhud/textures/Textures.java
index 61b19b7..871c145 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/textures/Textures.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/textures/Textures.java
@@ -16,13 +16,14 @@ import net.minecraft.client.resources.IResourceManagerReloadListener;
import net.minecraft.util.ResourceLocation;
public class Textures implements IResourceManagerReloadListener {
+
private static final TextureObject DEFAULT_TEXTURE = new TextureObject("Default");
private static final Gson gson = new GsonBuilder().create();
public static final List<TextureObject> styles = Lists.newArrayList(DEFAULT_TEXTURE);
public static TextureObject texture = DEFAULT_TEXTURE;
- public static void setTexture(int selected){
+ public static void setTexture(int selected) {
if (selected >= styles.size() || selected < 0) {
texture = DEFAULT_TEXTURE;
SkyblockHud.config.misc.style = 0;
@@ -45,5 +46,4 @@ public class Textures implements IResourceManagerReloadListener {
}
} catch (Exception ignored) {}
}
-
}