Merge pull request #24 from Juuxel/updates-oct-2023

Add 1.20.1, update Gradle/Loom, fix and clean up templates
This commit is contained in:
Max
2023-10-20 12:44:40 +02:00
committed by GitHub
21 changed files with 388 additions and 96 deletions

View File

@@ -1,6 +1,6 @@
plugins {
id "org.jetbrains.kotlin.jvm" version "1.8.10"
id "org.jetbrains.kotlin.plugin.serialization" version "1.8.10"
id "org.jetbrains.kotlin.jvm" version "1.9.10"
id "org.jetbrains.kotlin.plugin.serialization" version "1.9.10"
}
repositories {
@@ -8,7 +8,7 @@ repositories {
}
dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0"
implementation "org.kohsuke:github-api:1.135"
implementation "org.dom4j:dom4j:2.1.3"
}

View File

@@ -58,7 +58,7 @@
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/api_old"
"templates/api_1_16"
],
"tokens": {
"MINECRAFT": "1.16.5",
@@ -96,7 +96,7 @@
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/api_old",
"templates/api_1_16",
"templates/mixin",
"templates/mixin_fabric"
],
@@ -136,7 +136,7 @@
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/api_new"
"templates/api_1_17"
],
"tokens": {
"MINECRAFT": "1.17.1",
@@ -174,7 +174,7 @@
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/api_new",
"templates/api_1_17",
"templates/mixin",
"templates/mixin_fabric"
],
@@ -213,7 +213,7 @@
"description": "1.18.1 Forge-Fabric Template",
"templates": [
"templates/architectury",
"templates/api_new"
"templates/api_1_17"
],
"tokens": {
"MINECRAFT": "1.18.1",
@@ -250,7 +250,7 @@
"description": "1.18.1 Forge-Fabric Template with Mixins",
"templates": [
"templates/architectury",
"templates/api_new",
"templates/api_1_17",
"templates/mixin",
"templates/mixin_fabric"
],
@@ -290,7 +290,7 @@
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/api_new"
"templates/api_1_17"
],
"tokens": {
"MINECRAFT": "1.18.2",
@@ -328,7 +328,7 @@
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/api_new",
"templates/api_1_17",
"templates/mixin",
"templates/mixin_fabric"
],
@@ -344,7 +344,7 @@
"templates": [
"templates/architectury",
"templates/architectury_quilt",
"templates/api_new"
"templates/api_1_17"
],
"inherit_tokens": ["1.18.2-forge-fabric"],
"tokens": {
@@ -368,7 +368,7 @@
"templates": [
"templates/architectury",
"templates/architectury_quilt",
"templates/api_new",
"templates/api_1_17",
"templates/mixin",
"templates/mixin_quilt"
],
@@ -385,7 +385,7 @@
"templates/architectury",
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/api_new"
"templates/api_1_17"
],
"inherit_tokens": ["1.18.2-forge-fabric"],
"tokens": {
@@ -406,7 +406,7 @@
"templates/architectury",
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/api_new",
"templates/api_1_17",
"templates/mixin",
"templates/mixin_fabric",
"templates/mixin_quilt"
@@ -425,7 +425,7 @@
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/architectury_fabric_like",
"templates/api_new"
"templates/api_1_17"
],
"inherit_tokens": ["1.18.2-forge-fabric"],
"tokens": {
@@ -449,7 +449,7 @@
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/architectury_fabric_like",
"templates/api_new",
"templates/api_1_17",
"templates/mixin",
"templates/mixin_fabric",
"templates/mixin_quilt"
@@ -491,7 +491,7 @@
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/api_new"
"templates/api_1_17"
],
"tokens": {
"MINECRAFT": "1.19",
@@ -529,7 +529,7 @@
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/api_new",
"templates/api_1_17",
"templates/mixin",
"templates/mixin_fabric"
],
@@ -545,7 +545,7 @@
"templates": [
"templates/architectury",
"templates/architectury_quilt",
"templates/api_new"
"templates/api_1_17"
],
"inherit_tokens": ["1.19-forge-fabric"],
"tokens": {
@@ -569,7 +569,7 @@
"templates": [
"templates/architectury",
"templates/architectury_quilt",
"templates/api_new",
"templates/api_1_17",
"templates/mixin",
"templates/mixin_quilt"
],
@@ -586,7 +586,7 @@
"templates/architectury",
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/api_new"
"templates/api_1_17"
],
"inherit_tokens": ["1.19-forge-fabric"],
"tokens": {
@@ -607,7 +607,7 @@
"templates/architectury",
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/api_new",
"templates/api_1_17",
"templates/mixin",
"templates/mixin_fabric",
"templates/mixin_quilt"
@@ -626,7 +626,7 @@
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/architectury_fabric_like",
"templates/api_new"
"templates/api_1_17"
],
"inherit_tokens": ["1.19-forge-fabric"],
"tokens": {
@@ -650,7 +650,7 @@
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/architectury_fabric_like",
"templates/api_new",
"templates/api_1_17",
"templates/mixin",
"templates/mixin_fabric",
"templates/mixin_quilt"
@@ -692,7 +692,7 @@
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/api_new"
"templates/api_1_17"
],
"tokens": {
"MINECRAFT": "1.19.2",
@@ -730,7 +730,7 @@
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/api_new",
"templates/api_1_17",
"templates/mixin",
"templates/mixin_fabric"
],
@@ -746,7 +746,7 @@
"templates": [
"templates/architectury",
"templates/architectury_quilt",
"templates/api_new"
"templates/api_1_17"
],
"inherit_tokens": ["1.19.2-forge-fabric"],
"tokens": {
@@ -770,7 +770,7 @@
"templates": [
"templates/architectury",
"templates/architectury_quilt",
"templates/api_new",
"templates/api_1_17",
"templates/mixin",
"templates/mixin_quilt"
],
@@ -787,7 +787,7 @@
"templates/architectury",
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/api_new"
"templates/api_1_17"
],
"inherit_tokens": ["1.19.2-forge-fabric"],
"tokens": {
@@ -808,7 +808,7 @@
"templates/architectury",
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/api_new",
"templates/api_1_17",
"templates/mixin",
"templates/mixin_fabric",
"templates/mixin_quilt"
@@ -827,7 +827,7 @@
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/architectury_fabric_like",
"templates/api_new"
"templates/api_1_17"
],
"inherit_tokens": ["1.19.2-forge-fabric"],
"tokens": {
@@ -851,7 +851,7 @@
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/architectury_fabric_like",
"templates/api_new",
"templates/api_1_17",
"templates/mixin",
"templates/mixin_fabric",
"templates/mixin_quilt"
@@ -893,7 +893,7 @@
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/api_new"
"templates/api_1_19_3"
],
"tokens": {
"MINECRAFT": "1.19.3",
@@ -931,7 +931,7 @@
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/api_new",
"templates/api_1_19_3",
"templates/mixin",
"templates/mixin_fabric"
],
@@ -947,7 +947,7 @@
"templates": [
"templates/architectury",
"templates/architectury_quilt",
"templates/api_new"
"templates/api_1_19_3"
],
"inherit_tokens": ["1.19.3-forge-fabric"],
"tokens": {
@@ -971,7 +971,7 @@
"templates": [
"templates/architectury",
"templates/architectury_quilt",
"templates/api_new",
"templates/api_1_19_3",
"templates/mixin",
"templates/mixin_quilt"
],
@@ -988,7 +988,7 @@
"templates/architectury",
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/api_new"
"templates/api_1_19_3"
],
"inherit_tokens": ["1.19.3-forge-fabric"],
"tokens": {
@@ -1009,7 +1009,7 @@
"templates/architectury",
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/api_new",
"templates/api_1_19_3",
"templates/mixin",
"templates/mixin_fabric",
"templates/mixin_quilt"
@@ -1028,7 +1028,7 @@
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/architectury_fabric_like",
"templates/api_new"
"templates/api_1_19_3"
],
"inherit_tokens": ["1.19.3-forge-fabric"],
"tokens": {
@@ -1052,7 +1052,7 @@
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/architectury_fabric_like",
"templates/api_new",
"templates/api_1_19_3",
"templates/mixin",
"templates/mixin_fabric",
"templates/mixin_quilt"
@@ -1094,7 +1094,7 @@
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/api_new"
"templates/api_1_19_3"
],
"tokens": {
"MINECRAFT": "1.19.4",
@@ -1132,7 +1132,7 @@
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/api_new",
"templates/api_1_19_3",
"templates/mixin",
"templates/mixin_fabric"
],
@@ -1148,7 +1148,7 @@
"templates": [
"templates/architectury",
"templates/architectury_quilt",
"templates/api_new"
"templates/api_1_19_3"
],
"inherit_tokens": ["1.19.4-forge-fabric"],
"tokens": {
@@ -1172,7 +1172,7 @@
"templates": [
"templates/architectury",
"templates/architectury_quilt",
"templates/api_new",
"templates/api_1_19_3",
"templates/mixin",
"templates/mixin_quilt"
],
@@ -1189,7 +1189,7 @@
"templates/architectury",
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/api_new"
"templates/api_1_19_3"
],
"inherit_tokens": ["1.19.4-forge-fabric"],
"tokens": {
@@ -1210,7 +1210,7 @@
"templates/architectury",
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/api_new",
"templates/api_1_19_3",
"templates/mixin",
"templates/mixin_fabric",
"templates/mixin_quilt"
@@ -1229,7 +1229,7 @@
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/architectury_fabric_like",
"templates/api_new"
"templates/api_1_19_3"
],
"inherit_tokens": ["1.19.4-forge-fabric"],
"tokens": {
@@ -1253,7 +1253,7 @@
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/architectury_fabric_like",
"templates/api_new",
"templates/api_1_19_3",
"templates/mixin",
"templates/mixin_fabric",
"templates/mixin_quilt"
@@ -1265,6 +1265,207 @@
"MIXIN_COMPAT_LEVEL": "JAVA_17",
"__LOOM_FORGE_EXT": "#LOOM_FORGE_EXT"
}
},
"1.20.1-forge": {
"description": "1.20.1 Forge Template",
"templates": [
"templates/forge"
],
"tokens": {
"MINECRAFT": "1.20.1",
"JAVA_VERSION": "#JAVA_17",
"COMPILE_JAVA": "#COMPILE_JAVA_17",
"MCMETA_FORMAT": "15",
"YARN_MAPPINGS": {
"filter": "1\\.20\\.1\\+build\\..*",
"pom": "https://maven.fabricmc.net/net/fabricmc/yarn/maven-metadata.xml"
},
"FORGE": {
"filter": "1\\.20\\.1-.*",
"pom": "https://maven.minecraftforge.net/net/minecraftforge/forge/maven-metadata.xml"
},
"FORGE_LOADER_MAJOR": "47",
"MIXIN_COMPAT_LEVEL": "JAVA_17",
"FORGE_EXPLOSION_EVENT_PACKAGE": "net.minecraftforge.event.level",
"FORGE_EXPLOSION_EVENT_GET_LEVEL": "getLevel"
}
},
"1.20.1-forge-fabric": {
"description": "1.20.1 Forge-Fabric Template",
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/api_1_20"
],
"tokens": {
"MINECRAFT": "1.20.1",
"COMMON_MOD_LOADERS": "fabric,forge",
"INCLUDE_FABRIC_OR_QUILT": "include(\"fabric\")",
"JAVA_VERSION": "#JAVA_17",
"COMPILE_JAVA": "#COMPILE_JAVA_17_ARCH",
"__FABRIC_LOADER": "#FABRIC_LOADER",
"__FABRIC_LOADER_PROP": "#FABRIC_LOADER_PROP",
"MCMETA_FORMAT": "15",
"ARCHITECTURY_GROUP": "dev.architectury",
"ARCHITECTURY_PACKAGE": "dev.architectury",
"ARCHITECTURY_API": {
"filter": "9\\..*",
"pom": "https://maven.architectury.dev/dev/architectury/architectury/maven-metadata.xml"
},
"YARN_MAPPINGS": {
"filter": "1\\.20\\.1\\+build\\..*",
"pom": "https://maven.fabricmc.net/net/fabricmc/yarn/maven-metadata.xml"
},
"__FABRIC_API": {
"filter": ".*\\+1\\.20\\.1",
"pom": "https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api/maven-metadata.xml"
},
"__FABRIC_API_PROP": "#FABRIC_API_PROP",
"FORGE": {
"filter": "1\\.20\\.1-.*",
"pom": "https://maven.minecraftforge.net/net/minecraftforge/forge/maven-metadata.xml"
},
"FORGE_LOADER_MAJOR": "47"
}
},
"1.20.1-forge-fabric-mixin": {
"description": "1.20.1 Forge-Fabric Template with Mixins",
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/api_1_20",
"templates/mixin",
"templates/mixin_fabric"
],
"inherit_tokens": ["1.20.1-forge-fabric"],
"tokens": {
"__MIXIN_FABRIC_BLOCK": "#MIXIN_FABRIC_BLOCK",
"MIXIN_COMPAT_LEVEL": "JAVA_17",
"__LOOM_FORGE_EXT": "#LOOM_FORGE_EXT"
}
},
"1.20.1-forge-quilt": {
"description": "1.20.1 Forge-Quilt Template",
"templates": [
"templates/architectury",
"templates/architectury_quilt",
"templates/api_1_20"
],
"inherit_tokens": ["1.20.1-forge-fabric"],
"tokens": {
"COMMON_MOD_LOADERS": "quilt,forge",
"INCLUDE_FABRIC_OR_QUILT": "include(\"quilt\")",
"__FABRIC_LOADER_PROP": "",
"__FABRIC_LOADER": "",
"__FABRIC_API_PROP": "",
"__FABRIC_API": "",
"__QUILT_LOADER_PROP": "#QUILT_LOADER_PROP",
"__QUILT_LOADER": "#QUILT_LOADER",
"__QUILT_FABRIC_API_PROP": "#QUILT_FABRIC_API_PROP",
"__QUILT_FABRIC_API": {
"filter": ".*\\-1\\.20\\.1",
"pom": "https://maven.quiltmc.org/repository/release/org/quiltmc/quilted-fabric-api/quilted-fabric-api/maven-metadata.xml"
}
}
},
"1.20.1-forge-quilt-mixin": {
"description": "1.20.1 Forge-Quilt Template with Mixins",
"templates": [
"templates/architectury",
"templates/architectury_quilt",
"templates/api_1_20",
"templates/mixin",
"templates/mixin_quilt"
],
"inherit_tokens": ["1.20.1-forge-quilt"],
"tokens": {
"__MIXIN_QUILT_BLOCK": "#MIXIN_QUILT_BLOCK",
"MIXIN_COMPAT_LEVEL": "JAVA_17",
"__LOOM_FORGE_EXT": "#LOOM_FORGE_EXT"
}
},
"1.20.1-forge-fabric-quilt": {
"description": "1.20.1 Forge-Fabric-Quilt Template",
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/api_1_20"
],
"inherit_tokens": ["1.20.1-forge-fabric"],
"tokens": {
"COMMON_MOD_LOADERS": "quilt,fabric,forge",
"INCLUDE_FABRIC_OR_QUILT": "include(\"fabric\")\ninclude(\"quilt\")",
"__QUILT_LOADER_PROP": "#QUILT_LOADER_PROP",
"__QUILT_LOADER": "#QUILT_LOADER",
"__QUILT_FABRIC_API_PROP": "#QUILT_FABRIC_API_PROP",
"__QUILT_FABRIC_API": {
"filter": ".*\\-1\\.20\\.1",
"pom": "https://maven.quiltmc.org/repository/release/org/quiltmc/quilted-fabric-api/quilted-fabric-api/maven-metadata.xml"
}
}
},
"1.20.1-forge-fabric-quilt-mixin": {
"description": "1.20.1 Forge-Fabric-Quilt Template with Mixins",
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/api_1_20",
"templates/mixin",
"templates/mixin_fabric",
"templates/mixin_quilt"
],
"inherit_tokens": ["1.20.1-forge-fabric-quilt"],
"tokens": {
"__MIXIN_QUILT_BLOCK": "#MIXIN_QUILT_BLOCK",
"MIXIN_COMPAT_LEVEL": "JAVA_17",
"__LOOM_FORGE_EXT": "#LOOM_FORGE_EXT"
}
},
"1.20.1-forge-fabric-like": {
"description": "1.20.1 Forge-Fabric-Like Template",
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/architectury_fabric_like",
"templates/api_1_20"
],
"inherit_tokens": ["1.20.1-forge-fabric"],
"tokens": {
"COMMON_MOD_LOADERS": "quilt,fabric,forge",
"INCLUDE_FABRIC_OR_QUILT": "include(\"fabric-like\")\ninclude(\"fabric\")\ninclude(\"quilt\")",
"__FABRIC_ADD_FABRICLIKE": "#FABRIC_ADD_FABRICLIKE",
"__QUILT_ADD_FABRICLIKE": "#QUILT_ADD_FABRICLIKE",
"__QUILT_LOADER_PROP": "#QUILT_LOADER_PROP",
"__QUILT_LOADER": "#QUILT_LOADER",
"__QUILT_FABRIC_API_PROP": "#QUILT_FABRIC_API_PROP",
"__QUILT_FABRIC_API": {
"filter": ".*\\-1\\.20\\.1",
"pom": "https://maven.quiltmc.org/repository/release/org/quiltmc/quilted-fabric-api/quilted-fabric-api/maven-metadata.xml"
}
}
},
"1.20.1-forge-fabric-like-mixin": {
"description": "1.20.1 Forge-Fabric-Like Template with Mixins",
"templates": [
"templates/architectury",
"templates/architectury_fabric",
"templates/architectury_quilt",
"templates/architectury_fabric_like",
"templates/api_1_20",
"templates/mixin",
"templates/mixin_fabric",
"templates/mixin_quilt"
],
"inherit_tokens": ["1.20.1-forge-fabric-like"],
"tokens": {
"__MIXIN_FABRIC_BLOCK": "#MIXIN_FABRIC_BLOCK",
"__MIXIN_QUILT_BLOCK": "#MIXIN_QUILT_BLOCK",
"MIXIN_COMPAT_LEVEL": "JAVA_17",
"__LOOM_FORGE_EXT": "#LOOM_FORGE_EXT"
}
}
}
}

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -0,0 +1,33 @@
package net.examplemod;
import com.google.common.base.Suppliers;
import dev.architectury.registry.CreativeTabRegistry;
import dev.architectury.registry.registries.DeferredRegister;
import dev.architectury.registry.registries.RegistrarManager;
import dev.architectury.registry.registries.RegistrySupplier;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import java.util.function.Supplier;
public class ExampleMod {
public static final String MOD_ID = "examplemod";
// We can use this if we don't want to use DeferredRegister
public static final Supplier<RegistrarManager> REGISTRIES = Suppliers.memoize(() -> RegistrarManager.get(MOD_ID));
// Registering a new creative tab
public static final CreativeTabRegistry.TabSupplier EXAMPLE_TAB = CreativeTabRegistry.create(new ResourceLocation(MOD_ID, "example_tab"), () ->
new ItemStack(ExampleMod.EXAMPLE_ITEM.get()));
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(MOD_ID, Registries.ITEM);
public static final RegistrySupplier<Item> EXAMPLE_ITEM = ITEMS.register("example_item", () ->
new Item(new Item.Properties().arch$tab(ExampleMod.EXAMPLE_TAB)));
public static void init() {
ITEMS.register();
System.out.println(ExampleExpectPlatform.getConfigDirectory().toAbsolutePath().normalize().toString());
}
}

View File

@@ -0,0 +1,37 @@
package net.examplemod;
import com.google.common.base.Suppliers;
import dev.architectury.registry.CreativeTabRegistry;
import dev.architectury.registry.registries.DeferredRegister;
import dev.architectury.registry.registries.RegistrarManager;
import dev.architectury.registry.registries.RegistrySupplier;
import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import java.util.function.Supplier;
public class ExampleMod {
public static final String MOD_ID = "examplemod";
// We can use this if we don't want to use DeferredRegister
public static final Supplier<RegistrarManager> REGISTRIES = Suppliers.memoize(() -> RegistrarManager.get(MOD_ID));
// Registering a new creative tab
public static final DeferredRegister<CreativeModeTab> TABS = DeferredRegister.create(MOD_ID, Registries.CREATIVE_MODE_TAB);
public static final RegistrySupplier<CreativeModeTab> EXAMPLE_TAB = TABS.register("example_tab", () ->
CreativeTabRegistry.create(Component.translatable("itemGroup." + MOD_ID + ".example_tab"),
() -> new ItemStack(ExampleMod.EXAMPLE_ITEM.get())));
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(MOD_ID, Registries.ITEM);
public static final RegistrySupplier<Item> EXAMPLE_ITEM = ITEMS.register("example_item", () ->
new Item(new Item.Properties().arch$tab(ExampleMod.EXAMPLE_TAB)));
public static void init() {
TABS.register();
ITEMS.register();
System.out.println(ExampleExpectPlatform.getConfigDirectory().toAbsolutePath().normalize().toString());
}
}

View File

@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.1-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.3-SNAPSHOT" apply false
}
architectury {
@@ -28,7 +28,10 @@ allprojects {
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"
archivesBaseName = rootProject.archives_base_name
base {
archivesName = rootProject.archives_base_name
}
version = rootProject.mod_version
group = rootProject.maven_group

View File

@@ -46,17 +46,12 @@ shadowJar {
exclude "architectury.common.json"
configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
archiveClassifier = "dev-shadow"
}
remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
classifier null
}
jar {
classifier "dev"
}
sourcesJar {

View File

@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

18
templates/architectury/gradlew vendored Executable file → Normal file
View File

@@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,10 +80,10 @@ do
esac
done
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
@@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -205,6 +209,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

View File

@@ -14,7 +14,7 @@
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@@ -25,7 +25,8 @@
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal

View File

@@ -41,18 +41,13 @@ shadowJar {
exclude "architectury.common.json"
configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
archiveClassifier = "dev-shadow"
}
remapJar {
injectAccessWidener = true
input.set shadowJar.archiveFile
dependsOn shadowJar
classifier null
}
jar {
classifier "dev"
}
sourcesJar {

View File

@@ -12,5 +12,5 @@ dependencies {
// Remove the next line if you don't want to depend on the API
modApi "@ARCHITECTURY_GROUP@:architectury-fabric:${rootProject.architectury_version}"
compileClasspath(project(path: ":common", configuration: "namedElements")) { transitive false }
compileOnly(project(path: ":common", configuration: "namedElements")) { transitive false }
}

View File

@@ -51,18 +51,13 @@ shadowJar {
exclude "architectury.common.json"
configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
archiveClassifier = "dev-shadow"
}
remapJar {
injectAccessWidener = true
input.set shadowJar.archiveFile
dependsOn shadowJar
classifier null
}
jar {
classifier "dev"
}
sourcesJar {

View File

@@ -1,14 +1,19 @@
plugins {
id "dev.architectury.loom" version "1.1-SNAPSHOT"
id "dev.architectury.loom" version "1.3-SNAPSHOT"
id "maven-publish"
}
sourceCompatibility = targetCompatibility = JavaVersion.@JAVA_VERSION@
base {
archivesName = project.archives_base_name
}
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
java {
sourceCompatibility = targetCompatibility = JavaVersion.@JAVA_VERSION@
}
loom {
// use this if you are using the official mojang mappings
// and want loom to stop warning you about their license

Binary file not shown.

View File

@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

18
templates/forge/gradlew vendored Executable file → Normal file
View File

@@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,10 +80,10 @@ do
esac
done
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
@@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -205,6 +209,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

View File

@@ -14,7 +14,7 @@
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@@ -25,7 +25,8 @@
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal