Initial commit
This commit is contained in:
commit
fc567b9fd4
12 changed files with 770 additions and 0 deletions
155
build.gradle
Normal file
155
build.gradle
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
plugins {
|
||||
id 'net.minecraftforge.gradle' version '5.1.+'
|
||||
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
|
||||
}
|
||||
|
||||
def mod_version = '1.0.0'
|
||||
def minecraft_version = '1.18.2'
|
||||
def mantle_build = '1.9.25'
|
||||
def tinkers_build = '3.5.2.38'
|
||||
|
||||
group = 'xyz.nuark'
|
||||
version = "${minecraft_version}-${mod_version}"
|
||||
|
||||
java {
|
||||
archivesBaseName = 'tcleveling'
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
}
|
||||
|
||||
minecraft {
|
||||
mappings channel: 'official', version: '1.18.2'
|
||||
mappings channel: 'parchment', version: '2022.09.04-1.18.2'
|
||||
|
||||
runs {
|
||||
client {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
property 'forge.logging.markers', 'REGISTRIES'
|
||||
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
property 'forge.enabledGameTestNamespaces', 'tcleveling'
|
||||
|
||||
mods {
|
||||
tinkersconstructleveling {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
property 'forge.logging.markers', 'REGISTRIES'
|
||||
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
property 'forge.enabledGameTestNamespaces', 'tcleveling'
|
||||
|
||||
mods {
|
||||
tinkersconstructleveling {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gameTestServer {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
property 'forge.logging.markers', 'REGISTRIES'
|
||||
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
property 'forge.enabledGameTestNamespaces', 'tcleveling'
|
||||
|
||||
mods {
|
||||
tinkersconstructleveling {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
property 'forge.logging.markers', 'REGISTRIES'
|
||||
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
args '--mod', 'tinkersconstructleveling', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
|
||||
|
||||
mods {
|
||||
tinkersconstructleveling {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name 'DVS1 Maven FS'
|
||||
url 'https://dvs1.progwml6.com/files/maven'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft 'net.minecraftforge:forge:1.18.2-40.1.73'
|
||||
|
||||
implementation fg.deobf("slimeknights.mantle:Mantle:${minecraft_version}-${mantle_build}")
|
||||
implementation fg.deobf("slimeknights.tconstruct:TConstruct:${minecraft_version}-${tinkers_build}")
|
||||
}
|
||||
|
||||
def version_properties = [
|
||||
'version' : mod_version,
|
||||
'mc_version' : minecraft_version,
|
||||
'mantle_version' : mantle_build,
|
||||
'tinkers_version' : tinkers_build
|
||||
]
|
||||
|
||||
processResources {
|
||||
outputs.upToDateWhen { false }
|
||||
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
|
||||
|
||||
println("Generating version.properties")
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'META-INF/mods.toml'
|
||||
println("Processing mods.toml")
|
||||
expand version_properties
|
||||
|
||||
into '.'
|
||||
}
|
||||
|
||||
// replace stuff in mcmod.info, nothing else
|
||||
//from(sourceSets.main.resources.srcDirs) {
|
||||
// include 'META-INF/mods.toml'
|
||||
//
|
||||
// expand version_properties
|
||||
//}
|
||||
|
||||
into "$buildDir/resources/main/"
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes([
|
||||
"Specification-Title" : "tinkersconstructleveling",
|
||||
"Specification-Vendor" : "nuark",
|
||||
"Specification-Version" : "1",
|
||||
"Implementation-Title" : project.name,
|
||||
"Implementation-Version" : project.jar.archiveVersion,
|
||||
"Implementation-Vendor" : "nuark",
|
||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
jar.finalizedBy('reobfJar')
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue