Handle vanilla-like trim cloning recipes
This commit is contained in:
parent
280a8f3431
commit
940d8333de
@ -731,7 +731,7 @@ object MatterManager {
|
||||
private fun doTryToBacktrack(item: Item, makeCommentary: Boolean): Result {
|
||||
val recipes = input2Recipes[item]
|
||||
|
||||
if (recipes == null || recipes.isEmpty() || !recipes.all { it.allowBacktrack } || !recipes.all { it.inputs.all { it.all { it.input.item == item } } }) {
|
||||
if (recipes.isNullOrEmpty() || !recipes.all { it.allowBacktrack } || !recipes.all { it.inputs.all { it.all { it.input.item == item } } }) {
|
||||
if (makeCommentary)
|
||||
comment(item, TextComponent("Item '${item.registryName}' has no recipes"))
|
||||
|
||||
@ -859,14 +859,20 @@ object MatterManager {
|
||||
}
|
||||
}
|
||||
} else if (ivalue.isSkipped) {
|
||||
comment(item, TextComponent("Input $entry at input slot $i in ${recipe.formattedName} is recursive"))
|
||||
recursiveSkips.add(entry)
|
||||
|
||||
if (inputs.size == 1) {
|
||||
hadSkips = true
|
||||
continue@recipesLoop
|
||||
} else {
|
||||
if (recipes.size == 1 && entry.input.item == recipe.output.item) {
|
||||
// assume cloning and/or catalyst?
|
||||
comment(item, TextComponent("Input $entry at input slot $i is assumed to be cloning/catalyst"))
|
||||
continue@innerInputsLoop
|
||||
} else {
|
||||
comment(item, TextComponent("Input $entry at input slot $i in ${recipe.formattedName} is recursive"))
|
||||
recursiveSkips.add(entry)
|
||||
|
||||
if (inputs.size == 1) {
|
||||
hadSkips = true
|
||||
continue@recipesLoop
|
||||
} else {
|
||||
continue@innerInputsLoop
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user