mirror of
https://github.com/architectury/architectury-templates.git
synced 2026-04-01 21:17:45 -05:00
Update to Loom 0.11, add example common mixin, add common AWs
This commit is contained in:
2
body.txt
2
body.txt
@@ -4,5 +4,7 @@ The following templates are offered in [Creative Commons Zero v1.0 Universal](ht
|
||||
|
||||
Architectury API is added to the templates by default, there are instructions on how to remove them within the buildscripts, depending on the API is **not required** to use the Architectury toolchain.
|
||||
|
||||
**Make sure** to do a find everywhere on `examplemod` and replace it with your own mod id.
|
||||
|
||||
**Documentation:** [https://docs.architectury.dev/](https://docs.architectury.dev/)
|
||||
**Discord:** [https://discord.gg/C2RdJDpRBP](https://discord.gg/C2RdJDpRBP)
|
||||
@@ -69,7 +69,8 @@
|
||||
"filter": "1\\.16\\.5-.*",
|
||||
"pom": "https://maven.minecraftforge.net/net/minecraftforge/forge/maven-metadata.xml"
|
||||
},
|
||||
"FORGE_LOADER_MAJOR": "36"
|
||||
"FORGE_LOADER_MAJOR": "36",
|
||||
"MIXIN_FABRIC_BLOCK": ""
|
||||
}
|
||||
},
|
||||
"1.16-architectury-mixin": {
|
||||
@@ -81,6 +82,7 @@
|
||||
],
|
||||
"inherit_tokens": "1.16-architectury",
|
||||
"tokens": {
|
||||
"MIXIN_FABRIC_BLOCK": "\n \"mixins\": [\n \"examplemod.mixins.json\",\n \"examplemod-common.mixins.json\"\n ],",
|
||||
"MIXIN_COMPAT_LEVEL": "JAVA_8",
|
||||
"LOOM_FORGE_EXT": "loom {\n forge {\n mixinConfig \"examplemod-common.mixins.json\"\n mixinConfig \"examplemod.mixins.json\"\n }\n}\n"
|
||||
}
|
||||
@@ -139,7 +141,8 @@
|
||||
"filter": "1\\.17\\.1-.*",
|
||||
"pom": "https://maven.minecraftforge.net/net/minecraftforge/forge/maven-metadata.xml"
|
||||
},
|
||||
"FORGE_LOADER_MAJOR": "37"
|
||||
"FORGE_LOADER_MAJOR": "37",
|
||||
"MIXIN_FABRIC_BLOCK": ""
|
||||
}
|
||||
},
|
||||
"1.17-architectury-mixin": {
|
||||
@@ -151,41 +154,42 @@
|
||||
],
|
||||
"inherit_tokens": "1.17-architectury",
|
||||
"tokens": {
|
||||
"MIXIN_FABRIC_BLOCK": "\n \"mixins\": [\n \"examplemod.mixins.json\",\n \"examplemod-common.mixins.json\"\n ],",
|
||||
"MIXIN_COMPAT_LEVEL": "JAVA_16",
|
||||
"LOOM_FORGE_EXT": "loom {\n forge {\n mixinConfig \"examplemod-common.mixins.json\"\n mixinConfig \"examplemod.mixins.json\"\n }\n}\n"
|
||||
}
|
||||
},
|
||||
"1.18-forge": {
|
||||
"description": "1.18 Forge-Only Template",
|
||||
"description": "1.18.1 Forge-Only Template",
|
||||
"templates": [
|
||||
"templates/forge"
|
||||
],
|
||||
"tokens": {
|
||||
"MINECRAFT": "1.18",
|
||||
"MINECRAFT": "1.18.1",
|
||||
"JAVA_VERSION": "#JAVA_17",
|
||||
"COMPILE_JAVA": "#COMPILE_JAVA_17",
|
||||
"MCMETA_FORMAT": "8",
|
||||
"JEI_MAJOR": "9s",
|
||||
"JEI_MAJOR": "9",
|
||||
"YARN_MAPPINGS": {
|
||||
"filter": "1\\.18\\+build\\..*",
|
||||
"filter": "1\\.18\\.1\\+build\\..*",
|
||||
"pom": "https://maven.fabricmc.net/net/fabricmc/yarn/maven-metadata.xml"
|
||||
},
|
||||
"FORGE": {
|
||||
"filter": "1\\.18-.*",
|
||||
"filter": "1\\.18\\.1-.*",
|
||||
"pom": "https://maven.minecraftforge.net/net/minecraftforge/forge/maven-metadata.xml"
|
||||
},
|
||||
"FORGE_LOADER_MAJOR": "38",
|
||||
"FORGE_LOADER_MAJOR": "39",
|
||||
"MIXIN_COMPAT_LEVEL": "JAVA_16"
|
||||
}
|
||||
},
|
||||
"1.18-architectury": {
|
||||
"description": "1.18 Multi-Loader Template",
|
||||
"description": "1.18.1 Multi-Loader Template",
|
||||
"templates": [
|
||||
"templates/architectury",
|
||||
"templates/api_new"
|
||||
],
|
||||
"tokens": {
|
||||
"MINECRAFT": "1.18",
|
||||
"MINECRAFT": "1.18.1",
|
||||
"JAVA_VERSION": "#JAVA_17",
|
||||
"COMPILE_JAVA": "#COMPILE_JAVA_17_ARCH",
|
||||
"FABRIC_LOADER": "#FABRIC_LOADER",
|
||||
@@ -198,7 +202,7 @@
|
||||
"pom": "https://maven.architectury.dev/dev/architectury/architectury/maven-metadata.xml"
|
||||
},
|
||||
"YARN_MAPPINGS": {
|
||||
"filter": "1\\.18\\+build\\..*",
|
||||
"filter": "1\\.18\\.1\\+build\\..*",
|
||||
"pom": "https://maven.fabricmc.net/net/fabricmc/yarn/maven-metadata.xml"
|
||||
},
|
||||
"FABRIC_API": {
|
||||
@@ -206,10 +210,25 @@
|
||||
"pom": "https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api/maven-metadata.xml"
|
||||
},
|
||||
"FORGE": {
|
||||
"filter": "1\\.18-.*",
|
||||
"filter": "1\\.18\\.1-.*",
|
||||
"pom": "https://maven.minecraftforge.net/net/minecraftforge/forge/maven-metadata.xml"
|
||||
},
|
||||
"FORGE_LOADER_MAJOR": "38"
|
||||
"FORGE_LOADER_MAJOR": "39",
|
||||
"MIXIN_FABRIC_BLOCK": ""
|
||||
}
|
||||
},
|
||||
"1.18-architectury-mixin": {
|
||||
"description": "1.18.1 Multi-Loader Template with Mixins",
|
||||
"templates": [
|
||||
"templates/architectury",
|
||||
"templates/api_new",
|
||||
"templates/mixin"
|
||||
],
|
||||
"inherit_tokens": "1.18-architectury",
|
||||
"tokens": {
|
||||
"MIXIN_FABRIC_BLOCK": "\n \"mixins\": [\n \"examplemod.mixins.json\",\n \"examplemod-common.mixins.json\"\n ],",
|
||||
"MIXIN_COMPAT_LEVEL": "JAVA_16",
|
||||
"LOOM_FORGE_EXT": "loom {\n forge {\n mixinConfig \"examplemod-common.mixins.json\"\n mixinConfig \"examplemod.mixins.json\"\n }\n}\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
id "architectury-plugin" version "3.4-SNAPSHOT"
|
||||
id "dev.architectury.loom" version "0.10.0-SNAPSHOT" apply false
|
||||
id "dev.architectury.loom" version "0.11.0-SNAPSHOT" apply false
|
||||
}
|
||||
|
||||
architectury {
|
||||
|
||||
@@ -10,6 +10,10 @@ architectury {
|
||||
common()
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = file("src/main/resources/examplemod.accesswidener")
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenCommon(MavenPublication) {
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"accessWidener": "examplemod.accesswidener"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
accessWidener v2 named
|
||||
@@ -7,6 +7,10 @@ architectury {
|
||||
fabric()
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = project(":common").loom.accessWidenerPath
|
||||
}
|
||||
|
||||
configurations {
|
||||
common
|
||||
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
|
||||
@@ -34,11 +38,14 @@ processResources {
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
exclude "architectury.common.json"
|
||||
|
||||
configurations = [project.configurations.shadowCommon]
|
||||
classifier "dev-shadow"
|
||||
}
|
||||
|
||||
remapJar {
|
||||
injectAccessWidener = true
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
classifier null
|
||||
|
||||
@@ -18,13 +18,10 @@
|
||||
"main": [
|
||||
"net.examplemod.fabric.ExampleModFabric"
|
||||
]
|
||||
},
|
||||
},@MIXIN_FABRIC_BLOCK@
|
||||
"depends": {
|
||||
"fabric": "*",
|
||||
"minecraft": ">=@MINECRAFT@",
|
||||
"architectury": ">=@ARCHITECTURY_API@"
|
||||
},
|
||||
"suggests": {
|
||||
"flamingo": "*"
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,15 @@ architectury {
|
||||
forge()
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = project(":common").loom.accessWidenerPath
|
||||
|
||||
forge {
|
||||
convertAccessWideners = true
|
||||
extraAccessWideners.add loom.accessWidenerPath.get().asFile.name
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
common
|
||||
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
|
||||
@@ -34,6 +43,7 @@ processResources {
|
||||
|
||||
shadowJar {
|
||||
exclude "fabric.mod.json"
|
||||
exclude "architectury.common.json"
|
||||
|
||||
configurations = [project.configurations.shadowCommon]
|
||||
classifier "dev-shadow"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "dev.architectury.loom" version "0.10.0-SNAPSHOT"
|
||||
id "dev.architectury.loom" version "0.11.0-SNAPSHOT"
|
||||
id "maven-publish"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package net.examplemod.mixin;
|
||||
|
||||
import net.minecraft.client.gui.screens.TitleScreen;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(TitleScreen.class)
|
||||
public class MixinTitleScreen {
|
||||
@Inject(at = @At("HEAD"), method = "init()V")
|
||||
private void init(CallbackInfo info) {
|
||||
System.out.println("Hello from example architectury common mixin!");
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
"package": "net.examplemod.mixin",
|
||||
"compatibilityLevel": "@MIXIN_COMPAT_LEVEL@",
|
||||
"client": [
|
||||
"MixinTitleScreen"
|
||||
],
|
||||
"mixins": [
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user