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
|
||||
|
||||
# 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
|
||||
|
||||
21
README.md
21
README.md
@@ -1,2 +1,23 @@
|
||||
# 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[]
|
||||
{
|
||||
//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 = "Cool Mod" }, //change mod display name
|
||||
// ↕ <- Letter L is different case here
|
||||
|
||||
@@ -92,8 +92,7 @@ publishMods {
|
||||
file = project.tasks.remapJar.get().archiveFile
|
||||
dryRun = modrinthToken == null || curseforgeToken == null
|
||||
|
||||
displayName =
|
||||
"${mod.name} ${loader.replaceFirstChar { it.uppercase() }} ${property("mod.mc_title")}-${mod.version}"
|
||||
displayName = "${mod.name} ${loader.replaceFirstChar { it.uppercase() }} ${property("mod.mc_title")}-${mod.version}"
|
||||
version = mod.version
|
||||
changelog = rootProject.file("CHANGELOG.md").readText()
|
||||
type = BETA
|
||||
@@ -124,8 +123,7 @@ publishMods {
|
||||
|
||||
java {
|
||||
withSourcesJar()
|
||||
val java = if (stonecutter.eval(minecraft, ">=1.20.5"))
|
||||
JavaVersion.VERSION_21 else JavaVersion.VERSION_17
|
||||
val java = if (stonecutter.eval(minecraft, ">=1.20.5")) JavaVersion.VERSION_21 else JavaVersion.VERSION_17
|
||||
targetCompatibility = java
|
||||
sourceCompatibility = java
|
||||
}
|
||||
@@ -151,20 +149,43 @@ tasks.jar {
|
||||
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 {
|
||||
properties(listOf("fabric.mod.json"),
|
||||
properties(
|
||||
listOf("fabric.mod.json"),
|
||||
"id" to mod.id,
|
||||
"name" to mod.name,
|
||||
"version" to mod.version,
|
||||
"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,
|
||||
"name" to mod.name,
|
||||
"version" to mod.version,
|
||||
"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,
|
||||
"name" to mod.name,
|
||||
"version" to mod.version,
|
||||
@@ -176,11 +197,3 @@ tasks.build {
|
||||
group = "versioned"
|
||||
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
|
||||
|
||||
# Mod properties
|
||||
mod.version=2.0.0
|
||||
mod.group=io.github.jumperonjava
|
||||
mod.version=1.0.0
|
||||
mod.group=com.example
|
||||
mod.id=template
|
||||
mod.name=Template
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"script": {
|
||||
"enableScriptNuGetReferences": true,
|
||||
"defaultTargetFramework": "net9.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user