I'm trying to make a custom crafting system in minecraft with command blocks, and for this when someone puts in a correct recipe, it should give them the result and take one item out of each of the slots. There seems to be now way to easily remove just one item from a slot in a chest, and the only way I can think of is to detect if it is a certain stack size and put in that stack size minus one, but I would have to do that for every item because there seems to be no way to replaceitem to just modify the stack size and not the item
What I need: Something similar to
/replaceitem block x y z slot <keep item the same> ammount <keep data the same> <keep datatag the same>
or even to just be able to decrease the ammount of an item in slot x of a chest
Is there a way to replaceitem without changing the item or otherwise decrease the stack size of an item in a chest?