Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- buildscript {
- repositories {
- maven { url = 'https://maven.minecraftforge.net' }
- maven { url = 'https://maven.parchmentmc.org' }
- maven {
- name = "spongepowered"
- url = "https://repo.spongepowered.org/maven" //-----------------------------------------------------------------------
- }
- mavenCentral()
- }
- dependencies {
- classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
- classpath 'org.parchmentmc:librarian:1.+'
- classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT' //---------------------------------------------------------------------
- }
- }
- plugins {
- id 'eclipse'
- id 'maven-publish'
- }
- apply plugin: 'net.minecraftforge.gradle'
- apply plugin: 'org.parchmentmc.librarian.forgegradle'
- apply plugin: 'maven-publish' //---------------------------------------------------------------------------------------------------
- version = '1.0'
- group = 'com.totis.totismod' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
- archivesBaseName = 'totismod'
- 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.18.2'
- mappings channel: 'parchment', version: '1.18.1-2022.03.06-1.18.2'
- accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default.
- runs {
- client {
- workingDirectory project.file('run')
- arg "-mixin.config=totismod.mixins.json" //----------------------------------------------------------------------------
- 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')
- arg "-mixin.config=totismod.mixins.json" //----------------------------------------------------------------------------
- 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', 'examplemod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
- mods {
- totismod {
- source sourceSets.main
- }
- }
- }
- }
- }
- sourceSets.main.resources { srcDir 'src/generated/resources' }
- repositories {
- }
- dependencies {
- minecraft 'net.minecraftforge:forge:1.18.2-40.1.0'
- //---------------------------------------------------------------------------------------------------------------
- annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
- implementation("org.spongepowered:mixin:0.8") {
- transitive = false
- }
- }
- jar {
- manifest {
- attributes([
- "Specification-Title" : "Totis Mod",
- "Specification-Vendor" : "ElTotisPro50",
- "Specification-Version" : "1",
- "Implementation-Title" : project.name,
- "Implementation-Version" : project.jar.archiveVersion,
- "Implementation-Vendor" : "ElTotisPro50",
- "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
- "MixinConfigs": "totismod.mixins.json", //-------------------------------------------------------------------------
- ])
- }
- }
- jar.finalizedBy('reobfJar')
- publishing {
- publications {
- mavenJava(MavenPublication) {
- artifact jar
- }
- }
- repositories {
- maven {
- url "file://${project.projectDir}/mcmodsrepo"
- }
- }
- }
- apply plugin: 'org.spongepowered.mixin' //------------------------------------------------------------------------------------------
- tasks.withType(JavaCompile).configureEach {
- options.encoding = 'UTF-8'
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement