I got a bug report that Spectrum's Pedestal, which is able to craft vanilla recipes, breaks when Camerapture is also installed.
Checking out both in a dev env, I found that the recipe camerapture:picture_cloning returns a valid recipe on getRecipe when the input inventory is completely empty.
Your loop iterates all non-empty stacks in the inventory (of which there are none) and then returns a Optional.of(new Pair<>(<ItemStack.EMPTY>.copyWithCount(0), remainder)); in this case. It should be accounted for, so empty inventories don't match.
I got a bug report that Spectrum's Pedestal, which is able to craft vanilla recipes, breaks when Camerapture is also installed.
Checking out both in a dev env, I found that the recipe
camerapture:picture_cloning
returns a valid recipe ongetRecipe
when the input inventory is completely empty.Your loop iterates all non-empty stacks in the inventory (of which there are none) and then returns a
Optional.of(new Pair<>(<ItemStack.EMPTY>.copyWithCount(0), remainder));
in this case. It should be accounted for, so empty inventories don't match.https://github.com/chrrs/camerapture/blob/4d49c45060fabe43e1552cbb969fc325e331324e/src/main/java/me/chrr/camerapture/item/PictureCloningRecipe.java#L82-L108