As you can see from the title, the following code I am using creates ghost items in my custom workbench.
Things to note:
[*]No ghost items are created upon shift clicking on the output slot
[*]I have left comments on pretty much every line for the shift clicking, if I described anything wrong please let me know what the correct comment should be
[*]I am almost 100% sure the ghost items are being created in the transferStackInSlot method
ContainerUpgradeTable
If you require anything else from me, please let me know.
Thank you for your time
EDIT: Solved by simply adding slot.onSlotChanged(); after setting the itemstack to null when the itemstack has reached a size of 0.