Unable to Re-Add an item that has previously been removed from an OreDictionary
Terminal-Access opened this issue ยท 4 comments
Issue Description:
Dictionary does not accept an item if it was previously removed, and no error's are displayed or printed to the log file.
What happens:
CraftTweaker output's it's adding the item back to the dictionary, but when you perform a look up it has not been added, and their are no error's outputted.
What you expected to happen:
have the ability to remove then re-add an item when needed e.g if re-organizing the priority of items in an Dictionary.
Script used:
crafttweaker.log
Affected Versions
- Minecraft: 1.12.2
- Forge: 1.12.2-14.23.5.2820 through 1.12.2-14.23.5.2847 (Yes I have tested each version)
- Crafttweaker: 1.12-4.1.19
- Using a server: Yes (Forge)
- If yes, does the client have the exact same scripts?: Identical
Your most recent log file where the issue was present:
N\A - Please see crafttweaker.log above.
Here is a "dirty" workaround to this issue.
Simply create a new OreDictionary then have the existing OreDictionary mirror it.
Reproduction Steps:
0. (Optional Step) Clear the existing Dictionary.
- Create a new OreDictionary
- Add your items in the order you require.
- Make the existing dictionary mirror the newly created dictionary.
The reason for the "dirty" tag here is simply because using this workaround you end up with duplicated dictionaries.
Script Used:
https://pastebin.com/Chs8sJte
CraftTweaker Log:
https://pastebin.com/NnPupZqQ
In 1.12 actions are staged, you can never remove a recipe you added yourself for example, removals always happen before additions.
This works the same for oredict unfortunately and I have no plans to change it in 1.12 (it isn't like this in 1.14)
Thanks for the update Jared, It's a shame, as for the moment we are forced to stick with 1.12.2 as many of the mods we play with sadly don't have an update for 1.14 yet.
We will have to fall back to using the workaround i posted i guess.
thanks for letting us know what the cause of this issue is though, we have been sat for a few day's scraping our heads at why it's not working.
Could I suggest the addition of a message warning the end users of this issue though, wither in the documentation or as a form of error message if CT detects the removal of an item and then it being re added to the same oredict (if that kind of tracking is possible within the mod).
as I'm sure I'm not the only person to have stumbled upon this and been left wondering what i've been doing wrong.
Thanks again
Best Regards
Lee
It honestly hasn't come up all that much in 1.12's lifespan, and due to the way things are done, tracking those things will get pretty expensive as more things are done.
Also I am fairly sure the docs mention it somewhere, it may not be in relation to oredict though, but to IActions as a whole.