Most transformers not functioning consistently or correctly.
ZeroLevels opened this issue ยท 3 comments
Issue Description:
Most of the item transformers rarely work as intended. They sometimes do, but somehow the behavior changes on each restart. Behavior consistency seems to change as well depending on how you implement the transformers as well.
What happens:
- .giveBack:
- Usually returns twice as much as expected with each SINGLE operation. Usually, because this -
behavior is not consistent, so compensating doesn't help as it will randomly decide to work on some restarts. - Shift-clicking to craft an entire stack USUALLY results the amount you'd expect back, but other times it will give you the amount expected, plus one to a couple operations extra.
- .transformConsume:
- A disaster all around. Firstly, behavior is not consistent at all. That being said, it's all bad. Using the example recipe below, what you get back is completely dependent on the input stack-size. For instance, if you start with a stack of 64 grass in the crafting grid, you do get your 8 dirt back... but instead of consuming the specified amount of the item, it does some math to determine how much should be taken from the stack, and returns a stack with the appropriate amount removed to the inventory while consuming only 1 from the ORIGINAL stack that is still in the crafting grid.
- If your input stack size stack is exactly equal or below to what your transformConsume is expected to eat, the game just crashes.
- .transformDamage:
- Removes item from crafting grid, placing the newly-damaged item into your inventory. As a result, this makes stack crafting impossible.
- Gives you back ANOTHER damaged item as well.
- .transformReplace:
-- Behaves exactly like .giveBack, bugs and all. Even if .giveBack didn't have the bugs, transformReplace is supposed to leave something in the grid when doing a single operation.
NOTE The frequency of the above behaviors are lessened, but not eliminated completely when you attach the transformers to a variable, as opposed to just using the transformer on the ingredients of the recipe.
What you expected to happen:
- That .giveBack gives back the item specified.
- That .transformConsume subtracts the amount specified from the input stack while leaving it in the crafting grid.
- That .transformDamage damages the input item by the amount specified while leaving it in the crafting grid.
- That .transformReplace replaces the original input with the item and amount specified while leaving it in the grid unless the grid still contains more of the ingredients to work with. Only then should it default to .giveBack behavior.
Script used: https://pastebin.com/5FYaySX1
Minetweaker.log file: https://pastebin.com/G44PQpJi
Affected Versions (Do not use "latest"):
- Minecraft: 1.12.2, but these have been persistent issues for me since after 1.9.
- Forge: Every version that I've used, but at the time of writing this issue: 14.23.1.2605
- Crafttweaker: 1.12-4.1.2
Your most recent log file where the issue was present: https://pastebin.com/R0pihtM7
These issues should be fixed in the latest CrT release (released ~15h ago)
Please test.
GiveBack is the only one functioning oddly it seems. Sometimes it gives back only one of the input itemstack, other times it gives back 2. The pattern seems to be that it works on first use, but every other use, it returns twice as much giveBack as expected. The actual output seems to be fine.