buildscript {
    repositories {
        maven { url = 'https://files.minecraftforge.net/maven' }
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
    }
}
apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.

version = "${version}"
group = "mod.acgaming.spackenmobs"
archivesBaseName = "${jar_name}-${mc_version}"

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'

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.16.5'

    runs {
        client {
            workingDirectory project.file('run')

            // Recommended logging data for a userdev environment
            // property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

            // Recommended logging level for the console
            property 'forge.logging.console.level', 'debug'

            mods {
                spackenmobs {
                    source sourceSets.main
                }
            }
        }
        server {
            workingDirectory project.file('run')

            // Recommended logging data for a userdev environment
            // property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

            // Recommended logging level for the console
            property 'forge.logging.console.level', 'debug'

            mods {
                spackenmobs {
                    source sourceSets.main
                }
            }
        }
        data {
            workingDirectory project.file('run')

            // Recommended logging data for a userdev environment
            // property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

            // Recommended logging level for the console
            property 'forge.logging.console.level', 'debug'

            args '--mod', 'spackenmobs', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')

            mods {
                spackenmobs {
                    source sourceSets.main
                }
            }
        }
    }
}

dependencies {
    minecraft 'net.minecraftforge:forge:1.16.5-36.2.29'
}

jar {
    manifest {
        attributes([
                "Specification-Title": "spackenmobs",
                "Specification-Vendor": "ACGaming",
                "Specification-Version": "1", // We are version 1 of ourselves
                "Implementation-Title": project.name,
                "Implementation-Version": "${version}",
                "Implementation-Vendor" :"ACGaming",
                "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
        ])
    }
}