Added nuggets + json files. F

Removed unnecessary lignite ores.
Fixed oreDict
This commit is contained in:
Robert Sosnitzka
2016-07-22 00:44:17 +02:00
parent 6a932e6e56
commit 374f1f1d24
42 changed files with 325 additions and 63 deletions

View File

@@ -133,4 +133,85 @@ curseforge {
displayName = "taiga-${project.buildInfo.revision}"
}
}
}
}
/* FOR AUTO JSON
ext.args = [:]
ext.requireArgument = {String property, String displayValue ->
def value = args[property]
if (value == null) {
throw new InvalidUserDataException("$property must be set with \'$property=$displayValue\'")
}
return value
}
tasks.addRule("Pattern: <property>=<value>: Passes arguments to the scripts") { String taskName ->
def match = taskName =~ /(.*?)=(.*?$)/
if (match) {
def property = match[0][1]
def value = match[0][2]
ext.args[property] = value;
task(taskName) << {
println "Passes value \'$value\' to args[\'$property\']"
}
}
}
import org.apache.tools.ant.filters.FixCrLfFilter
class CopyJsonTemplate extends DefaultTask {
@Input
def template
@Input
def arguments
@Input
def jsonRename
@TaskAction
def build() {
def args = arguments()
project.copy {
from("templates/${template}") {
expand(args)
filter(FixCrLfFilter, eol: FixCrLfFilter.CrLf.newInstance('crlf'))
}
into 'src/main/resources'
rename { String filename ->
def match = filename =~ /(.*)\.json/
if (match) {
def prevFilename = match[0][1]
def newFilename = jsonRename.call(prevFilename)
return "${newFilename}.json"
}
else {
return filename
}
}
}
}
}
task generateBlockModel(type: CopyJsonTemplate) {
template 'block'
arguments {
def blockName = requireArgument('blockName', 'block_name')
return ['modid':archivesBaseName, 'block_name':blockName]
}
jsonRename {
return args['blockName']
}
}
task generateItemModel(type: CopyJsonTemplate) {
template 'item'
arguments {
def itemName = requireArgument('itemName', 'item_name')
return ['modid':archivesBaseName, 'item_name':itemName]
}
jsonRename {
return args['itemName']
}
}*/