Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- buildscript {
- dependencies {
- // MixinGradle:
- classpath 'org.spongepowered:mixingradle:0.7.+'
- }
- }
- plugins {
- id 'eclipse'
- id 'maven-publish'
- id 'net.minecraftforge.gradle' version '5.1.+'
- }
- // MixinGradle:
- apply plugin: 'org.spongepowered.mixin'
- version = '1.0'
- group = 'com.yourname.modid'
- archivesBaseName = 'modid'
- 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.2"
- runs {
- client {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'REGISTRIES'
- property 'forge.logging.console.level', 'debug'
- property 'forge.enabledGameTestNamespaces', 'examplemod'
- mods {
- examplemod {
- source sourceSets.main
- }
- }
- }
- server {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'REGISTRIES'
- property 'forge.logging.console.level', 'debug'
- property 'forge.enabledGameTestNamespaces', 'examplemod'
- mods {
- examplemod {
- source sourceSets.main
- }
- }
- }
- gameTestServer {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'REGISTRIES'
- property 'forge.logging.console.level', 'debug'
- property 'forge.enabledGameTestNamespaces', 'examplemod'
- mods {
- examplemod {
- 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 {
- examplemod {
- source sourceSets.main
- }
- }
- }
- }
- }
- sourceSets.main.resources { srcDir 'src/generated/resources' }
- mixin {
- // MixinGradle Settings
- add sourceSets.main, 'mixins.examplemod.refmap.json'
- config 'mixins.examplemod.json'
- debug.verbose = true
- debug.export = true
- }
- repositories {
- maven {
- // JEI
- url "https://dvs1.progwml6.com/files/maven/"
- }
- maven {
- // TOP
- url "https://maven.k-4u.nl"
- }
- }
- dependencies {
- minecraft "net.minecraftforge:forge:1.19.2-43.1.1"
- // Apply Mixin AP
- annotationProcessor "org.spongepowered:mixin:0.8.5:processor"
- // JEI
- compileOnly fg.deobf("mezz.jei:jei-1.19.2-common-api:11.2.0.256")
- compileOnly fg.deobf("mezz.jei:jei-1.19.2-forge-api:11.2.0.256")
- runtimeOnly fg.deobf("mezz.jei:jei-1.19.2-forge:11.2.0.256")
- // TOP
- implementation fg.deobf(project.dependencies.create("mcjty.theoneprobe:theoneprobe:1.19-6.2.0-6") {
- transitive = false
- })
- }
- jar {
- manifest {
- attributes([
- "Specification-Title" : "examplemod",
- "Specification-Vendor" : "examplemodsareus",
- "Specification-Version" : "1",
- "Implementation-Title" : project.name,
- "Implementation-Version" : project.jar.archiveVersion,
- "Implementation-Vendor" : "examplemodsareus",
- "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'
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement