How to get the Dimension ID

Hey all, I was wondering how I could get the Dimension ID number from a world with the sponge api, this is like 1 = Overworld. Anyone know how?

Sponge does not work with magic numerical values, in any circumstance. The string ID should be enough for most use-cases, since the API can convert it into DimensionType. Otherwise, you’ll need to use Minecraft internals.

My question to you is “why?” What purpose do you need the dimension numerical id’s for?

1 Like

I can hear footstep from another world, i figure out the reason is: level_sponge.dat#dimensionId duplicate. So I also want to know how do I get this id from the code so that I can fix the duplication problem.

File an issue on SpongeCommon/Forge if you can please, you necro’ed a 2 year old thread that didn’t even have a valid response.