diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/MatterManager.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/MatterManager.kt index 77822466f..59cd19849 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/MatterManager.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/MatterManager.kt @@ -552,8 +552,8 @@ object MatterManager { if (resultItem.isEmpty) { null } else { - val width: Int - val height: Int + var width: Int + var height: Int if (it is IShapedRecipe<*>) { width = it.recipeWidth @@ -563,6 +563,11 @@ object MatterManager { height = 3 } + if (width * height < it.ingredients.size) { + width = it.ingredients.size.coerceAtLeast(width) + height = it.ingredients.size.coerceAtLeast(height) + } + val container = TransientCraftingContainer(object : AbstractContainerMenu(null, 0) { override fun quickMoveStack(pPlayer: Player, pIndex: Int): ItemStack { return ItemStack.EMPTY