diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/recipe/PlatePressRecipe.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/recipe/PlatePressRecipe.kt index 9242d442e..dbc68c2c1 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/recipe/PlatePressRecipe.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/recipe/PlatePressRecipe.kt @@ -18,6 +18,7 @@ import org.apache.logging.log4j.LogManager import ru.dbotthepony.mc.otm.OverdriveThatMatters import ru.dbotthepony.mc.otm.block.entity.PlatePressBlockEntity import ru.dbotthepony.mc.otm.container.get +import ru.dbotthepony.mc.otm.core.isActuallyEmpty import ru.dbotthepony.mc.otm.registry.MRecipes import ru.dbotthepony.mc.otm.core.registryName @@ -29,14 +30,14 @@ class PlatePressRecipe( val workTime: Int = 200 ) : Recipe { override fun matches(container: Container, p_44003_: Level): Boolean { - if (output.isEmpty || input.isEmpty) + if (output.isActuallyEmpty || input.isActuallyEmpty) return false return input.test(container[PlatePressBlockEntity.SLOT_INPUT]) } private val outputStack: ItemStack by lazy { - if (output.isEmpty || input.isEmpty) { + if (output.isActuallyEmpty || input.isActuallyEmpty) { ItemStack.EMPTY } else { val items = output.items @@ -46,14 +47,14 @@ class PlatePressRecipe( } override fun getIngredients(): NonNullList { - if (input.isEmpty || output.isEmpty) + if (input.isActuallyEmpty || output.isActuallyEmpty) return super.getIngredients() return NonNullList.of(Ingredient.EMPTY, input) } override fun isIncomplete(): Boolean { - return ForgeHooks.hasNoElements(input) || ForgeHooks.hasNoElements(output) + return input.isActuallyEmpty || output.isActuallyEmpty } override fun assemble(p_44001_: Container): ItemStack = outputStack.copy()