O'Reilly logo

Minecraft™ Mod Development in 24 Hours, Sams Teach Yourself by Jimmy Koene

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a Custom Dimension

There are only three dimensions in Minecraft, and adding a custom one can make a mod very interesting and large. However, for a dimension, you need a lot of code.

The mod class code required for a custom dimension should look like this:

public static int dimension = 5;DimensionManager.registerProviderType(dimension, WorldProviderExample.class, false);DimensionManager.registerDimension(dimension, dimension);

It is suggested to make the dimension ID configurable for compatibility with other mods.

WorldProviderExample

The WorldProvider contains several important settings for your dimension. Mainly, it sets the WorldChunkManager, which is a class that mostly handles biomes. In this case, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required