Fix autogeneration of blasting recipes. Closes #2432

This commit is contained in:
drcrazy 2021-08-16 12:23:14 +03:00
parent 32a24e3291
commit e81a924459

View file

@ -317,8 +317,8 @@ task github(dependsOn: remapJar) {
} }
github.dependsOn(project(":RebornCore").getTasks().getByName("remapJar")) github.dependsOn(project(":RebornCore").getTasks().getByName("remapJar"))
// Generate recipe JSON for similar recipes
task compileRecipes { task compileRecipes {
description "Generate recipe JSON for similar recipes"
def jsonSlurper = new JsonSlurper() def jsonSlurper = new JsonSlurper()
def recipePath = "build/resources/main/data/techreborn/recipes" def recipePath = "build/resources/main/data/techreborn/recipes"
@ -328,7 +328,7 @@ task compileRecipes {
doLast { doLast {
// Add any recipe filenames that don't match the regex here // Add any recipe filenames that don't match the regex here
String[] whitelist = [] String[] whitelist = []
def pattern = ~'^\\w+_(ingot(_from_dust)?)\\.json$' def pattern = ~'^\\w+_(ingot)\\w*\\.json$'
file(smeltingPath).eachFileRecurse(groovy.io.FileType.FILES) { file(smeltingPath).eachFileRecurse(groovy.io.FileType.FILES) {
if (whitelist.contains(it.name) || it.name ==~ pattern) { if (whitelist.contains(it.name) || it.name ==~ pattern) {