Item duplication in CraftTweaker 1.11.2-3.0.24
MentalMouse opened this issue ยท 2 comments
Issue Description:
Simple scripts produce item duplication -- two different kinds with different functions.
What happens:
I write a small script to let MysticalAgriculture's inferium series of essences to be upgraded blockwise instead of unit-wise, using their Master Infusion Crystal which is not consumed in the crafting. With two separate scripts, I encountered unexpected item duplication.
My first version used giveBack(). As per the recipe, I put 16 blocks of inferium apiece in 4 slots surrounding an MIC. when I tried to take a block of prudentium, I got it, but then I had 30 blocks of inferium in each of the four slots, while the MIC dropped into my inventory. I later confirmed with other values, it was taking one recipe's worth and duplicating the rest.
Since the results were unexpected, I investigated further, and discovered that I apparently should have used reuse(), and changed the script. Now the inferium wasn't duplicated, but the MIC was, in its crafting slot! Note that MICs are not normally stackable; when picking up the stack I could only put one in each inventory slot.
What you expected to happen:
Four blocks of inferium consumed for each block of prudentium produced, the MIC to remain unchanged.
Script used (Please Pastebin or gist your script, posting an unpasted or ungist'd script will automatically close this issue):
Giveback() version:
https://pastebin.com/cdBB5krC
reuse() version:
https://pastebin.com/n9ENPS3m
Minetweaker.log file (Please Pastebin or gist your file, posting an unpasted or ungist'd file will automatically close this issue):
https://pastebin.com/Am7vka2q
https://pastebin.com/Am7vka2q
Affected Versions (Do not use "latest"):
- Minecraft: 1.11.2
- Forge: 13.20.0.2228
- Crafttweaker: CraftTweaker-1.11.2-3.0.24.jar
Your most recent log file where the issue was present:
[pastebin/gist/etc link here]
(the script was the reuse version)