Skip to content

Datapack usage

Crystal Spider edited this page Oct 13, 2024 · 10 revisions

Creating a Datapack

To create a datapack you can follow this guide.
However, if you're creating a mod, you should just put your files under resources/data/.

Make sure you put all the required files under server_sided_portals namespace for them to be recognized.

Custom Dimension

A custom dimension is created via a single JSON file, and it defines world generation.
You can use this generator to create your own.

Custom Dimension Type

A custom dimension type is created via a single JSON file, and it defines dimension properties, for example whether beds work.
You can use this generator to create your own.

Custom Portal Frame

A portal frame consists of the blocks around the actual portal that allow its formation.
To define which blocks your custom portal frame can be made of you just have to create a block tag.
Each block listed in your block tag can be used to create your custom portal frame interchangeably. Also, when the game automatically creates one of your custom portals, each block will be chosen randomly from the block tag.

The name of the block tag needs to be the same as your dimension: if your dimension file is called my_dim.json, then your block tag needs to be my_dim.json as well.