From f77099c8ea421e2dbba53f04f70ae0bdf2970536 Mon Sep 17 00:00:00 2001 From: Carmelo Buscemi Date: Sat, 11 Jun 2022 12:06:53 +0200 Subject: [PATCH] feat: quilt --- common/build.gradle | 2 +- common/src/main/resources/architectury.common.json | 3 +++ gradle.properties | 3 ++- quilt/build.gradle | 5 ++++- .../quilt/AnimalFeedingTroughClientModQuilt.java | 5 ++++- quilt/src/main/resources/quilt.mod.json | 11 ++++++----- 6 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 common/src/main/resources/architectury.common.json diff --git a/common/build.gradle b/common/build.gradle index c253f86..464b559 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -7,7 +7,7 @@ dependencies { } architectury { - common() + common(rootProject.enabled_platforms.split(",")) } publishing { diff --git a/common/src/main/resources/architectury.common.json b/common/src/main/resources/architectury.common.json new file mode 100644 index 0000000..71b9269 --- /dev/null +++ b/common/src/main/resources/architectury.common.json @@ -0,0 +1,3 @@ +{ + "accessWidener": "animal_feeding_trough.accesswidener" +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 6298618..677d4d4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,6 +13,7 @@ archives_base_name=animal_feeding_trough # Architectury architectury_version=5.5.18 +enabled_platforms=fabric,forge,quilt # Fabric fabric_loader_version=0.14.7 @@ -22,5 +23,5 @@ fabric_api_version=0.55.3+1.19 forge_version=41.0.5 # Quilt -quilt_fabric_api_version=1.0.0-beta.13+0.51.1-1.18.2 +quilt_fabric_api_version=2.0.0-alpha.2+0.55.3-1.19 quilt_loader_version=0.17.0-beta.4 \ No newline at end of file diff --git a/quilt/build.gradle b/quilt/build.gradle index 70aac10..b807ebf 100644 --- a/quilt/build.gradle +++ b/quilt/build.gradle @@ -39,6 +39,8 @@ dependencies { // shadowCommon(project(path: ":fabric-like", configuration: "transformProductionQuilt")) { transitive false } } +version = "${rootProject.mod_version}+${rootProject.minecraft_version}-quilt" + processResources { inputs.property "group", rootProject.maven_group inputs.property "version", project.version @@ -78,7 +80,7 @@ components.java { skip() } } - +/* publishing { publications { mavenQuilt(MavenPublication) { @@ -92,3 +94,4 @@ publishing { // Add repositories to publish to here. } } +*/ \ No newline at end of file diff --git a/quilt/src/main/java/slexom/animal_feeding_trough/platform/quilt/AnimalFeedingTroughClientModQuilt.java b/quilt/src/main/java/slexom/animal_feeding_trough/platform/quilt/AnimalFeedingTroughClientModQuilt.java index 166e44b..543ff25 100644 --- a/quilt/src/main/java/slexom/animal_feeding_trough/platform/quilt/AnimalFeedingTroughClientModQuilt.java +++ b/quilt/src/main/java/slexom/animal_feeding_trough/platform/quilt/AnimalFeedingTroughClientModQuilt.java @@ -1,15 +1,18 @@ package slexom.animal_feeding_trough.platform.quilt; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; import org.quiltmc.loader.api.ModContainer; import org.quiltmc.qsl.base.api.entrypoint.client.ClientModInitializer; import slexom.animal_feeding_trough.platform.common.AnimalFeedingTroughMod; public class AnimalFeedingTroughClientModQuilt implements ClientModInitializer { + @Override + @Environment(EnvType.CLIENT) public void onInitializeClient(ModContainer mod) { AnimalFeedingTroughMod.onInitializeClient(); } - } diff --git a/quilt/src/main/resources/quilt.mod.json b/quilt/src/main/resources/quilt.mod.json index e2f880a..c9b5be9 100644 --- a/quilt/src/main/resources/quilt.mod.json +++ b/quilt/src/main/resources/quilt.mod.json @@ -1,7 +1,11 @@ { "schema_version": 1, + "mixin": [ + "mixins.animal_feeding_trough.json" + ], "quilt_loader": { - "group": "${group}", "id": "animal_feeding_trough", + "group": "${group}", + "id": "animal_feeding_trough", "version": "${version}", "name": "Animal Feeding Trough", "description": "-", @@ -20,13 +24,10 @@ "init": [ "slexom.animal_feeding_trough.platform.quilt.AnimalFeedingTroughModQuilt" ], - "client": [ + "client_init": [ "slexom.animal_feeding_trough.platform.quilt.AnimalFeedingTroughClientModQuilt" ] }, - "mixins": [ - "mixins.animal_feeding_trough.json" - ], "depends": [ { "id": "quilt_loader",