From ab38dff212e274a1f73d27aece6e57a4b45ff6e2 Mon Sep 17 00:00:00 2001 From: andi-makes Date: Sat, 9 Dec 2023 14:16:38 +0100 Subject: [PATCH] fix fabric --- .../src/main/resources/{assets/lighty => }/icon.png | Bin common/src/main/resources/lighty.mixins.json | 1 + fabric/build.gradle | 5 ++++- fabric/src/main/resources/fabric.mod.json | 2 +- forge/build.gradle | 10 +++++----- forge/src/main/resources/META-INF/mods.toml | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) rename common/src/main/resources/{assets/lighty => }/icon.png (100%) diff --git a/common/src/main/resources/assets/lighty/icon.png b/common/src/main/resources/icon.png similarity index 100% rename from common/src/main/resources/assets/lighty/icon.png rename to common/src/main/resources/icon.png diff --git a/common/src/main/resources/lighty.mixins.json b/common/src/main/resources/lighty.mixins.json index 6fd3405..01be884 100644 --- a/common/src/main/resources/lighty.mixins.json +++ b/common/src/main/resources/lighty.mixins.json @@ -2,6 +2,7 @@ "required": true, "minVersion": "0.8", "package": "dev.schmarrn.lighty.mixin", + "refmap": "lighty.refmap.json", "compatibilityLevel": "JAVA_8", "client": [ "LightUpdateMixin", diff --git a/fabric/build.gradle b/fabric/build.gradle index 620528d..27c7da7 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -7,7 +7,7 @@ version = rootProject.findProperty("mod_version") group = rootProject.findProperty("maven_group") base { - archivesName = rootProject.findProperty("mod_name") + archivesName = rootProject.findProperty("mod_name") + "-fabric" } repositories { @@ -19,6 +19,9 @@ repositories { } loom { + mixin { + defaultRefmapName.set("lighty.refmap.json") + } } dependencies { diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 502ae3d..514ff7d 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -14,7 +14,7 @@ "issues": "https://github.com/SchmarrnDevs/Lighty/issues" }, "license": "Apache-2.0", - "icon": "assets/lighty/icon.png", + "icon": "icon.png", "environment": "client", "entrypoints": { "client": [ diff --git a/forge/build.gradle b/forge/build.gradle index a85f9d2..8b5d912 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -4,6 +4,7 @@ plugins { id 'idea' id 'maven-publish' id 'net.neoforged.gradle.userdev' version '7.0.57' + id 'net.neoforged.gradle.mixin' version '7.0.57' } version = rootProject.findProperty("mod_version") @@ -11,17 +12,16 @@ group = rootProject.findProperty("maven_group") repositories { mavenLocal() - mavenCentral() - maven { - name = 'Sponge / Mixin' - url = 'https://repo.spongepowered.org/repository/maven-public/' - } } base { archivesName = "${rootProject.findProperty("mod_name")}-neoforge" } +mixin { + config "lighty.mixins.json" +} + // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. java.toolchain.languageVersion = JavaLanguageVersion.of(17) diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index 8a2e967..b2f8a79 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -9,7 +9,7 @@ version = "${mod_version}" displayName = "${mod_name}" authors = "${mod_authors}" description = '''${mod_description}''' -logoFile = "assets/lighty/icon.png" +logoFile = "icon.png" [[dependencies.${mod_id}]] modId = "neoforge"