The canAcceptOutput function was mutating the count of the passed ItemStack, causing the Redstone Assembler to sometimes output too few items depending on what was already in the output slots.
This issue can be reproduced simply by setting the Redstone to crafting mode and putting a bunch of iron ingots into the crafting grid. After a stack of iron nuggets has accumulated in the output slots, fewer than 9 nuggets will be produced for each subsequent ingot.
The
canAcceptOutput
function was mutating the count of the passed ItemStack, causing the Redstone Assembler to sometimes output too few items depending on what was already in the output slots.This issue can be reproduced simply by setting the Redstone to crafting mode and putting a bunch of iron ingots into the crafting grid. After a stack of iron nuggets has accumulated in the output slots, fewer than 9 nuggets will be produced for each subsequent ingot.