Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plugins {
- id 'eclipse'
- id 'maven-publish'
- id 'net.minecraftforge.gradle' version '5.1.+'
- }
- version = '1.0-1.19.4'
- group = 'com.totis.totismod' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
- archivesBaseName = 'totismod'
- // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
- java.toolchain.languageVersion = JavaLanguageVersion.of(17)
- println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
- minecraft {
- mappings channel: 'official', version: '1.19.4'
- // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
- runs {
- client {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'REGISTRIES'
- property 'forge.logging.console.level', 'debug'
- property 'forge.enabledGameTestNamespaces', 'totismod'
- mods {
- totismod {
- source sourceSets.main
- }
- }
- }
- server {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'REGISTRIES'
- property 'forge.logging.console.level', 'debug'
- property 'forge.enabledGameTestNamespaces', 'totismod'
- mods {
- totismod {
- source sourceSets.main
- }
- }
- }
- gameTestServer {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'REGISTRIES'
- property 'forge.logging.console.level', 'debug'
- property 'forge.enabledGameTestNamespaces', 'totismod'
- mods {
- totismod {
- source sourceSets.main
- }
- }
- }
- data {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'REGISTRIES'
- property 'forge.logging.console.level', 'debug'
- args '--mod', 'totismod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
- mods {
- totismod {
- source sourceSets.main
- }
- }
- }
- }
- }
- // Include resources generated by data generators.
- sourceSets.main.resources { srcDir 'src/generated/resources' }
- repositories {
- }
- dependencies {
- minecraft 'net.minecraftforge:forge:1.19.4-45.1.16'
- annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' //Probably this hasn't changed
- implementation("org.spongepowered:mixin:0.8") {
- transitive = false
- }
- }
- // Example for how to get properties into the manifest for reading at runtime.
- jar {
- manifest {
- attributes([
- "Specification-Title" : "Totis Mods",
- "Specification-Vendor" : "ElTotisPro50",
- "Specification-Version" : "1.0", // We are version 1 of ourselves
- "Implementation-Title" : project.name,
- "Implementation-Version" : project.jar.archiveVersion,
- "Implementation-Vendor" : "ElTotisPro50",
- "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
- ])
- }
- }
- jar.finalizedBy('reobfJar')
- publishing {
- publications {
- mavenJava(MavenPublication) {
- artifact jar
- }
- }
- repositories {
- maven {
- url "file://${project.projectDir}/mcmodsrepo"
- }
- }
- }
- tasks.withType(JavaCompile).configureEach {
- options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement