Readme
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@@ -46,9 +46,10 @@ local.properties
|
|||||||
.architectury-transformer\debug.log
|
.architectury-transformer\debug.log
|
||||||
.architectury-transformer/debug.log
|
.architectury-transformer/debug.log
|
||||||
|
|
||||||
# YOU CAN REMOVE EVERYTHING ELSE AFTER THAT LINE, that is only for template renaming
|
# YOU CAN REMOVE EVERYTHING ELSE AFTER THAT LINE, that is only for template renaming script
|
||||||
|
# YOU CAN REMOVE EVERYTHING ELSE AFTER THAT LINE, that is only for template renaming script
|
||||||
|
# YOU CAN REMOVE EVERYTHING ELSE AFTER THAT LINE, that is only for template renaming script
|
||||||
|
# YOU CAN REMOVE EVERYTHING ELSE AFTER THAT LINE, that is only for template renaming script
|
||||||
|
|
||||||
|
|
||||||
## Ignore Visual Studio temporary files, build results, and
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
|||||||
21
README.md
21
README.md
@@ -1,2 +1,23 @@
|
|||||||
# Stonecutter template
|
# Stonecutter template
|
||||||
|
|
||||||
|
This template allows you create multiloader multitemplate mod using stonecutter and architectury
|
||||||
|
|
||||||
|
It is based on my CustomCursor project
|
||||||
|
|
||||||
|
To change versions check settings.gradle.kts
|
||||||
|
|
||||||
|
You can use c# script to automatically change all template names.
|
||||||
|
Open RenameTemplate.cs, change names in replacements array and run "dotnet run" in this directory
|
||||||
|
I would highly recommend to do this before opening project in your IDE, and then remove all c# related files from project
|
||||||
|
(obj and bin folders, .csproj and script itself). Also you can remove c# stuff from .gitignore (there is comment for that)
|
||||||
|
|
||||||
|
If you have some issues with template ping me in [Kiku's realm](https://discord.gg/TBgNUCfryS) or official fabric discord
|
||||||
|
|
||||||
|
Currently supported versions these,
|
||||||
|
but you can easily add other versions if you need that
|
||||||
|
- 1.20.1, fabric, lexforge
|
||||||
|
- 1.20.4, fabric, neoforge
|
||||||
|
- 1.21.1, fabric, neoforge
|
||||||
|
- 1.21.3, fabric, neoforge
|
||||||
|
- 1.21.4, fabric, neoforge
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
var replacements = new[]
|
var replacements = new[]
|
||||||
{
|
{
|
||||||
//ORDER MATTERS
|
//ORDER MATTERS
|
||||||
new { Old = "com.example.template", New = "io.github.cooldev.coolmod" }, //change mod package
|
new { Old = "com.example", New = "io.github.cooldev" }, //change mod package
|
||||||
new { Old = "template", New = "coolmod" }, //change modid
|
new { Old = "template", New = "coolmod" }, //change modid
|
||||||
new { Old = "Template", New = "Cool Mod" }, //change mod display name
|
new { Old = "Template", New = "Cool Mod" }, //change mod display name
|
||||||
// ↕ <- Letter L is different case here
|
// ↕ <- Letter L is different case here
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ architectury.common(stonecutter.tree.branches.mapNotNull {
|
|||||||
if (stonecutter.current.project !in it) null
|
if (stonecutter.current.project !in it) null
|
||||||
else it.prop("loom.platform")
|
else it.prop("loom.platform")
|
||||||
})
|
})
|
||||||
repositories{
|
repositories {
|
||||||
maven("https://maven.neoforged.net/releases/")
|
maven("https://maven.neoforged.net/releases/")
|
||||||
|
|
||||||
//modmenu
|
//modmenu
|
||||||
@@ -70,7 +70,7 @@ loom {
|
|||||||
options.put("mark-corresponding-synthetics", "1")
|
options.put("mark-corresponding-synthetics", "1")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(loader == "forge") {
|
if (loader == "forge") {
|
||||||
forge.mixinConfigs(
|
forge.mixinConfigs(
|
||||||
"template-common.mixins.json",
|
"template-common.mixins.json",
|
||||||
"template-forge.mixins.json",
|
"template-forge.mixins.json",
|
||||||
@@ -92,8 +92,7 @@ publishMods {
|
|||||||
file = project.tasks.remapJar.get().archiveFile
|
file = project.tasks.remapJar.get().archiveFile
|
||||||
dryRun = modrinthToken == null || curseforgeToken == null
|
dryRun = modrinthToken == null || curseforgeToken == null
|
||||||
|
|
||||||
displayName =
|
displayName = "${mod.name} ${loader.replaceFirstChar { it.uppercase() }} ${property("mod.mc_title")}-${mod.version}"
|
||||||
"${mod.name} ${loader.replaceFirstChar { it.uppercase() }} ${property("mod.mc_title")}-${mod.version}"
|
|
||||||
version = mod.version
|
version = mod.version
|
||||||
changelog = rootProject.file("CHANGELOG.md").readText()
|
changelog = rootProject.file("CHANGELOG.md").readText()
|
||||||
type = BETA
|
type = BETA
|
||||||
@@ -124,8 +123,7 @@ publishMods {
|
|||||||
|
|
||||||
java {
|
java {
|
||||||
withSourcesJar()
|
withSourcesJar()
|
||||||
val java = if (stonecutter.eval(minecraft, ">=1.20.5"))
|
val java = if (stonecutter.eval(minecraft, ">=1.20.5")) JavaVersion.VERSION_21 else JavaVersion.VERSION_17
|
||||||
JavaVersion.VERSION_21 else JavaVersion.VERSION_17
|
|
||||||
targetCompatibility = java
|
targetCompatibility = java
|
||||||
sourceCompatibility = java
|
sourceCompatibility = java
|
||||||
}
|
}
|
||||||
@@ -151,20 +149,43 @@ tasks.jar {
|
|||||||
archiveClassifier = "dev"
|
archiveClassifier = "dev"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val buildAndCollect = tasks.register<Copy>("buildAndCollect") {
|
||||||
|
group = "versioned"
|
||||||
|
description = "Must run through 'chiseledBuild'"
|
||||||
|
from(tasks.remapJar.get().archiveFile, tasks.remapSourcesJar.get().archiveFile)
|
||||||
|
into(rootProject.layout.buildDirectory.file("libs/${mod.version}/$loader"))
|
||||||
|
dependsOn("build")
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stonecutter.current.isActive) {
|
||||||
|
rootProject.tasks.register("buildActive") {
|
||||||
|
group = "project"
|
||||||
|
dependsOn(buildAndCollect)
|
||||||
|
}
|
||||||
|
|
||||||
|
rootProject.tasks.register("runActive") {
|
||||||
|
group = "project"
|
||||||
|
dependsOn(tasks.named("runClient"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks.processResources {
|
tasks.processResources {
|
||||||
properties(listOf("fabric.mod.json"),
|
properties(
|
||||||
|
listOf("fabric.mod.json"),
|
||||||
"id" to mod.id,
|
"id" to mod.id,
|
||||||
"name" to mod.name,
|
"name" to mod.name,
|
||||||
"version" to mod.version,
|
"version" to mod.version,
|
||||||
"minecraft" to mod.prop("mc_dep_fabric")
|
"minecraft" to mod.prop("mc_dep_fabric")
|
||||||
)
|
)
|
||||||
properties(listOf("META-INF/mods.toml", "pack.mcmeta"),
|
properties(
|
||||||
|
listOf("META-INF/mods.toml", "pack.mcmeta"),
|
||||||
"id" to mod.id,
|
"id" to mod.id,
|
||||||
"name" to mod.name,
|
"name" to mod.name,
|
||||||
"version" to mod.version,
|
"version" to mod.version,
|
||||||
"minecraft" to mod.prop("mc_dep_forgelike")
|
"minecraft" to mod.prop("mc_dep_forgelike")
|
||||||
)
|
)
|
||||||
properties(listOf("META-INF/neoforge.mods.toml", "pack.mcmeta"),
|
properties(
|
||||||
|
listOf("META-INF/neoforge.mods.toml", "pack.mcmeta"),
|
||||||
"id" to mod.id,
|
"id" to mod.id,
|
||||||
"name" to mod.name,
|
"name" to mod.name,
|
||||||
"version" to mod.version,
|
"version" to mod.version,
|
||||||
@@ -176,11 +197,3 @@ tasks.build {
|
|||||||
group = "versioned"
|
group = "versioned"
|
||||||
description = "Must run through 'chiseledBuild'"
|
description = "Must run through 'chiseledBuild'"
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register<Copy>("buildAndCollect") {
|
|
||||||
group = "versioned"
|
|
||||||
description = "Must run through 'chiseledBuild'"
|
|
||||||
from(tasks.remapJar.get().archiveFile, tasks.remapSourcesJar.get().archiveFile)
|
|
||||||
into(rootProject.layout.buildDirectory.file("libs/${mod.version}/$loader"))
|
|
||||||
dependsOn("build")
|
|
||||||
}
|
|
||||||
@@ -7,8 +7,8 @@ org.gradle.parallel=false
|
|||||||
#org.gradle.configureondemand=true
|
#org.gradle.configureondemand=true
|
||||||
|
|
||||||
# Mod properties
|
# Mod properties
|
||||||
mod.version=2.0.0
|
mod.version=1.0.0
|
||||||
mod.group=io.github.jumperonjava
|
mod.group=com.example
|
||||||
mod.id=template
|
mod.id=template
|
||||||
mod.name=Template
|
mod.name=Template
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"script": {
|
|
||||||
"enableScriptNuGetReferences": true,
|
|
||||||
"defaultTargetFramework": "net9.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user