java.lang.IllegalStateException: No world found!
SenZ01 opened this issue ยท 4 comments
Incompatability between Apotheosis and InControl
MC 1.16.5
Forge - 36.2.33
InControl - 1.16-5.2.11
After placing down an Apotheosis spawner and rightclicking it with a soul lantern which is supposed to make said spawner ignore light levels both client and server crashed.
Here as a quick explanation on what is happening from the Apotheosis Dev.
When you use the soul lantern I have to use a "fake world" where I can forcibly control the light levels to evaluate if the mob can spawn given all conditions except the light level
Whatever InControl is doing is not prepared to receive the fake world
likely doing an unsafe cast from SeverLevelAccessor to Level
they're doing the thing they shouldn't be doing, which is just instanceof/casting
https://github.com/McJtyMods/InControl/blob/1.16/src/main/java/mcjty/incontrol/tools/varia/Tools.java#L164
realistically though
all they need to change are these lines
} else if (world instanceof WorldGenRegion) {
sw = ((WorldGenRegion) world).getLevel();
->
} else if (world instanceof ServerLevelAccessor) {
sw = ((ServerLevelAccessor) world).getLevel();
This solution works fine on 1.18 and 1.19 but not on 1.16. 1.16 doesn't have ServerLevelAccessor