IllegalArgument ("Invalid dimension id") in registerDimension
OrdinatorStouff opened this issue ยท 6 comments
I spoke with you on Discord about this and you said that it was a mystery in the first place, something caused by vanilla and a solution unknown to you.
When we spoke on Discord, that person having the problem "fixed" it with a fresh pack download.
Since then I have seen this same issue at least 2 more times but I think it might have been 3 more actually.
Most recent example: AllTheMods/ATM-3#345 (comment)
More people chiming in with "me too" on this as well: AllTheMods/ATM-3#339
Instead of bringing it back up on Discord I figured a formal discussion here might be warranted in case any other packs/players are seeing an increased occurrence of this issue as well and JED being the only mod in the stacktrace (besides forge)...
This is most likely caused by/explained in MinecraftForge/MinecraftForge#3885
The dev build from 2017-12-25 or later re-uses already registered DimensionType entries as much as possible (and registers a few commonly used ones as early as possible). That should solve or at least mitigate this issue (and from what I've seen and heard, that build seems to fix this for all users I've seen thus far). And there really isn't much else I can do while the DimensionType remains an enum. Hopefully, and possibly, this gets changed in vanilla in 1.13.
Apologies for a necropost but I came across this via the forge issue.
I would suggest caching the DimensionType
s registered in your own list field as using DimensionType.values()
is part of the problem.
That would probably be a good idea for the registration and re-use in JED, but that would still leave the issue of Forge not (necessarily) finding the registered DimensionType
based on an ID? Or were they even used in that way... (I don't have my IDE at hand atm). But yeah, I'll add this to the TODO list.
Oh so you were specifically referring to JED getting rid of or at least reducing the usage of the values()
method to delay it being JIT'ed?