Mmm! mmm. Custom Ingredients with getItems() returning literally minecraft:air
This commit is contained in:
parent
d7b5534bb5
commit
37bb00d73e
@ -82,6 +82,7 @@ import ru.dbotthepony.mc.otm.core.util.formatSiComponent
|
||||
import ru.dbotthepony.mc.otm.core.util.formatTickDuration
|
||||
import ru.dbotthepony.mc.otm.core.ifPresentK
|
||||
import ru.dbotthepony.mc.otm.core.isActuallyEmpty
|
||||
import ru.dbotthepony.mc.otm.core.isNotEmpty
|
||||
import ru.dbotthepony.mc.otm.core.math.isZero
|
||||
import ru.dbotthepony.mc.otm.core.orNull
|
||||
import ru.dbotthepony.mc.otm.core.readItemType
|
||||
@ -453,7 +454,7 @@ object MatterManager {
|
||||
ResolvedRecipe(
|
||||
it.ingredients.stream()
|
||||
.filter { !it.isActuallyEmpty }
|
||||
.map { it.items.stream().map(::RecipeEntry) },
|
||||
.map { it.items.stream().filter { it.isNotEmpty }.map(::RecipeEntry) },
|
||||
ImmutableStack(it.getResultItem(server.registryAccess())),
|
||||
isCritical = isCritical,
|
||||
name = it.id,
|
||||
@ -553,8 +554,10 @@ object MatterManager {
|
||||
|
||||
if (thisResidue.isEmpty) {
|
||||
result.add(RecipeEntry(item))
|
||||
} else {
|
||||
} else if (item.isNotEmpty) {
|
||||
result.add(RecipeEntry(ImmutableStack(item), ImmutableStack(thisResidue)))
|
||||
} else {
|
||||
LOGGER.warn("Crafting table recipe ${it.id} has literally minecraft:air as item at $c")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user