Since bad recipes are usually outside of user's control, don't choke and die on them, just log problematic recipes and move on

This commit is contained in:
DBotThePony 2024-09-29 11:22:56 +07:00
parent 19a7a8ddf6
commit 1ae3be6499
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -438,9 +438,12 @@ object MatterManager {
allowBacktrack = allowBacktrack
)
} catch(err: Throwable) {
throw RuntimeException("Processing simple recipe ${it.id}", err)
// throw RuntimeException("Processing simple recipe ${it.id}", err)
LOGGER.error("Processing simple recipe ${it.id}", err)
null
}
}
.filterNotNull()
.filter {
if (it.inputs.isEmpty()) {
LOGGER.warn("${it.formattedName} with output '${it.output.item.registryName}' ended up with no inputs!")
@ -547,7 +550,8 @@ object MatterManager {
)
}
} catch(err: Throwable) {
throw RuntimeException("Processing crafting table recipe ${it.id}", err)
LOGGER.error("Processing crafting table recipe ${it.id}", err)
null
}
}.filterNotNull().filter {
if (it.inputs.isEmpty()) {
@ -596,7 +600,8 @@ object MatterManager {
allowBacktrack = allowBacktrack
)
} catch(err: Throwable) {
throw RuntimeException("Processing smithing recipe ${it.id}", err)
LOGGER.error("Processing smithing recipe ${it.id}", err)
null
}
}.filterNotNull().filter {
if (it.inputs.isEmpty()) {