From eb491144f3f62515369f65cca159a8be037b83a6 Mon Sep 17 00:00:00 2001 From: coolGi Date: Sun, 18 Feb 2024 19:02:56 +1030 Subject: [PATCH] Refactored logos into assets/distanthorizons --- .../common/wrappers/gui/updater/UpdateModScreen.java | 9 +-------- coreSubProjects | 2 +- fabric/src/main/resources/fabric.mod.json | 2 +- forge/src/main/resources/META-INF/mods.toml | 4 ++-- neoforge/src/main/resources/META-INF/mods.toml | 4 ++-- 5 files changed, 7 insertions(+), 14 deletions(-) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/UpdateModScreen.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/UpdateModScreen.java index 074e96b21..1662849bd 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/UpdateModScreen.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/updater/UpdateModScreen.java @@ -66,13 +66,6 @@ public class UpdateModScreen extends DhScreen try { - // We cannot get assets from the root of the mod so we use this hack - // TODO: Load the icon.png and logo.png in the mod initialise rather than here - ResourceLocation logoLocation = new ResourceLocation(ModInfo.ID, "logo.png"); - Minecraft.getInstance().getTextureManager().register( - logoLocation, - new DynamicTexture(NativeImage.read(JarUtils.accessFile("logo.png"))) - ); // Logo image @@ -84,7 +77,7 @@ public class UpdateModScreen extends DhScreen // Offset 0, 0, // Some textuary stuff - 0, logoLocation, 130, 65, + 0, new ResourceLocation(ModInfo.ID, "logo.png"), 130, 65, // Create the button and tell it where to go // For now it goes to the client option by default (buttonWidget) -> System.out.println("Nice, you found an easter egg :)"), // TODO: Add a proper easter egg to pressing the logo (maybe with confetti) diff --git a/coreSubProjects b/coreSubProjects index 7826d756d..87e564737 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 7826d756d0a882eedfb033882ade06aaf4cbf7ab +Subproject commit 87e56473791c56bea97834ae27b5a588db354caa diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index c14865e15..3aa8af35d 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -17,7 +17,7 @@ }, "license": "LGPL-3", - "icon": "icon.png", + "icon": "assets/distanthorizons/icon.png", "accessWidener": "distanthorizons.accesswidener", diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index 3f199093b..983a89cde 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -12,8 +12,8 @@ issueTrackerURL = "${issues}" #//updateJSONURL="https://change.me.example.invalid/updates.json" # A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/ displayURL = "${homepage}" description = "${description}" #//mandatory. The description text for the mod - logoFile = "logo.png" - catalogueImageIcon = "icon.png" + logoFile = "assets/distanthorizons/logo.png" + catalogueImageIcon = "assets/distanthorizons/icon.png" credits = "Massive thanks to: Leonardo, Cola, Ran, CoolGi, and Leetom. For their hard work to bring Distant Horizons to where it is today. - James" #// if not set defaults to "false" clientSideOnly = "true" diff --git a/neoforge/src/main/resources/META-INF/mods.toml b/neoforge/src/main/resources/META-INF/mods.toml index e8abb9812..dd5a9fa74 100644 --- a/neoforge/src/main/resources/META-INF/mods.toml +++ b/neoforge/src/main/resources/META-INF/mods.toml @@ -12,8 +12,8 @@ issueTrackerURL = "${issues}" #//updateJSONURL="https://change.me.example.invalid/updates.json" # A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/ displayURL = "${homepage}" description = "${description}" #//mandatory. The description text for the mod - logoFile = "logo.png" - catalogueImageIcon = "icon.png" + logoFile = "assets/distanthorizons/logo.png" + catalogueImageIcon = "assets/distanthorizons/icon.png" credits = "Massive thanks to: Leonardo, Cola, Ran, CoolGi, and Leetom. For their hard work to bring Distant Horizons to where it is today. - James" #// if not set defaults to "false" clientSideOnly = "true"