Duplicating items
You can duplicate items in the crafting area by just clicking around in the slots after crafting the item. If you double click it remakes the stack and lets you make another item. It took a few tries but after a few minutes I got the hang of it.
Could you try to explain, step-by-step, the process involved?
How to reproduce on master branch:
- Start new server
- Log in and give yourself four wood
- Open inventory and place the wood into the crafting area as if you were crafting a workbench
- Take the workbench and place it in an empty inventory slot (all as you'd expect it till this point)
- Double click in the crafting are -> you have one wood on your cursor
- Place the wood in your inventory -> four wood are back
I ran into this bug with the current code, and found another way to reproduce it:
- Get 1 log
- Craft log into 4 planks
- Put 4 planks in crafting area (like crafting a crafting table)
- Pick up crafting table from output slot (ingredients dissapear)
- Place table in inventory
- Close and reopen inventory
- Ingredients and output are back (but attempting to craft creates ghost items)
- Pick up and place back down one of the crafting ingredients (now crafting creates real items)
- Repeat for as many crafting tables as you want
The tables can be verified as not ghost items by placing them down. The can be interacted with like normal crafting tables. The duplicated items can also be stacked.
For anyone interested in fixing this:
This is due to CraftingManager.removeItems not yet being implemented and due to it never being called in the first place (which is fixed in PR #484).
Just stopping by to link this to #1. I'm leaving this ticket open because it is too large to add to a checklist, but relevant enough to be linked to the parent ticket.