Enchantment Token recipes get mixed up when new enchantments are added
SilentChaos512 opened this issue ยท 0 comments
This occurs when new enchantments are added to an existing world. New worlds are fine. This is likely a result of enchantments using Forge's persistent registry, I guess. As new enchantments are added, they land in different spots than they would have otherwise. Enchantment token recipes are added in post-init at the latest; before world loads in other words. When the old world is loaded, things get mixed. I assume that is because enchantments on item stacks still use numerical ID's.
Possible fixes:
- Rework enchantment tokens, setting them to store their enchantments by name, instead of using vanilla's method. This will invalidate any existing tokens. This is likely the best solution.
- Set recipes on world load. This would likely require removing the existing recipes on every world load. It could work, and might take the least amount of effort, but... it sounds messy. I'd rather not mess with the crafting recipe list.