Get error "Invalid dimension id 2" when create new world

I want create a new world.

    WorldArchetype worldArchetype = WorldArchetype.builder().dimension(DimensionTypes.OVERWORLD).build("ww", "ww");
    try {
        WorldProperties worldProperties = Sponge.getServer().createWorldProperties("ww", worldArchetype);
    } catch (IOException e) {

Why this code will given:

java.lang.IllegalArgumentException: Invalid dimension id 2
        at$getById$0(SourceFile:636) ~[avg.class:?]
        at java.util.Optional.orElseThrow(Unknown Source) ~[?:1.8.0_71]
        at ~[avg.class:?]
        at<init>(SourceFile:121) ~[lw.class:?]
        at ~[WorldManager.class:1.11.2-6.1.0-BETA-6]
        at ~[WorldManager.class:1.11.2-6.1.0-BETA-6]
        at ~[WorldManager.class:1.11.2-6.1.0-BETA-6]
        at net.minecraft.server.MinecraftServer.loadWorld(SourceFile:3797) ~[MinecraftServer.class:?]
        at tw.mcark.tony.pluginlab.PluginLab.onGameInitialization( ~[PluginLab.class:?]
        at org.spongepowered.common.event.listener.GameStartedServerEventListener_PluginLab_onGameInitialization3.handle(Unknown Source) ~[?:?]
        at org.spongepowered.common.event.RegisteredListener.handle( ~[RegisteredListener.class:1.11.2-6.1.0-BETA-6]
        at [SpongeEventManager.class:1.11.2-6.1.0-BETA-6]
        at [SpongeEventManager.class:1.11.2-6.1.0-BETA-6]
        at [SpongeEventManager.class:1.11.2-6.1.0-BETA-6]
        at org.spongepowered.common.SpongeImpl.postState( [SpongeImpl.class:1.11.2-6.1.0-BETA-6]
        at org.spongepowered.server.SpongeVanilla.onServerStarting( [SpongeVanilla.class:1.11.2-6.1.0-BETA-6]
        at net.minecraft.server.dedicated.DedicatedServer.handler$callServerStarting$zoe000(SourceFile:1249) [lh.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(SourceFile:229) [lh.class:?]
        at [MinecraftServer.class:?]
        at Source) [?:1.8.0_71]

I don’t see anyway can change dimension id. Why?

Sponge Version: SpongeVanilla version 1.11.2-6.1.0-BETA-6

Not sure if this will help, but you can try the method

instead of


Still no, further more, even use Project Worlds will get same result. Consider it’s a bug?

  1. Start a new server
  2. Install Project Worlds
  3. /world create w123
  4. /world load w123
  5. same issue occurred

/world properties w123

It could definitely be. I’m having problems with WorldGenerators too and it could be a related issue. Unfortunately I’m not really the guy to determine that.

It is definitely a known bug in the spongevanilla series for a while, but appears to have had a fix made very recently for the bleeding-7.0.0 api versions that may or may not have been merged yet.

1 Like

I bump this topic because I updated to sponge API 7 and here is what I get : ---- Minecraft Crash Report ----// Would you like a cupcake?Time: 6/10/17 -

What can I do for this chunk ? Going on it and hard delete it ?

Edit : Went there, deleted chunk, same crash error.

Thats something quite different, and not related to the dimension problem.
It should be addressed as its own issue.

If you use the seed for the map on a spongeforge server with no other mods /plugins, do you get the same issue (intrinsically, the mansion generator having problems populating the map). If not, then wipe the map files, and add one plugin at a time back until you get the same error again - it may be something hooking into the generator code in order to enhance things within the structures, beef up chest contents or such if it can be isolated to a plugin cause. Though most of your plugins being permission and chat related probabably can be safely stroked off as culprits, nucleus does have map-generating stuff… Worldedit and FAWE are are generally passive and wouldn’t be linked to it, but shouldn’t be overlooked.

If its a pure-server cause, then having the seed value for replicating and observing the bug will be critical. (Also note, if its a plugin that is identified, contacting its author with the seed and location as well would be prudent)

1 Like

Great, I will investigate with your advices. Thanks for repyling :slight_smile: