blob: c6973e41848476eeb26a8046732f25665be7036b [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
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'
version = '1.0'
group = 'com.apache.nlpcraft'
archivesBaseName = 'nlpcraft-example-minecraft-mod'
ext {
minecraftVersion = '1.16.4'
}
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
minecraft {
mappings channel: 'snapshot', version: '20201028-1.16.3'
runs {
server {
workingDirectory project.file('run')
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug'
mods {
examplemod {
source sourceSets.main
}
}
}
}
}
dependencies {
minecraft "net.minecraftforge:forge:$minecraftVersion-35.1.13"
}
jar {
manifest {
attributes([
"Specification-Title": "examplemod",
"Specification-Vendor": "examplemodsareus",
"Specification-Version": "1",
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor": "examplemodsareus",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
task dumpBlocks(type: JavaExec) {
description = 'Dumps game file objects. Supports 2 types: items and blocks'
classpath sourceSets.main.runtimeClasspath
main = "org.apache.nlpcraft.example.minecraft.utils.NCMinecraftFilesDump"
args "block", minecraftVersion
}
task dumpItems(type: JavaExec) {
description = 'Dumps game file objects. Supports 2 types: items and blocks'
classpath sourceSets.main.runtimeClasspath
main = "org.apache.nlpcraft.example.minecraft.utils.NCMinecraftFilesDump"
args "block", minecraftVersion
}
jar.finalizedBy('reobfJar')