-
Notifications
You must be signed in to change notification settings - Fork 4
Dimension stacking
Dimension stacking is the core feature of this mod.
Two or more dimensions that are meant to have a vertical spacial relation to each other form a dimension stack, which represents their vertical order.
All dimensions that are part of such a dimension stack will automatically get their top (Y-level 255 by default) and bottom (Y-level 0) layer replaced with Transition Portal blocks during world generation (the top and bottom most dimension in the stack are only equipped with one such portal layer of course).
These portals will later lead to the adjacent dimension according to the dimension stack.
Any dimension available in the game can theoretically be part of a dimension stack. It is also possible to have multiple independent dimension stacks, where players can't travel between without the help of external teleportation devices.
Dimension stacks are registered inside this mods config file. This is simply done by adding the following line (for each such stack) into the PRE_INIT() section:
add("dimstack", [<bottomDim>, <nextDimUp>, ..., <topDim>]#);
, where <bottomDim>, etc. are the numerical ids of the dimensions to connect.
Note: each dimension can only appear at most once in only one dimension stack. The only exception is putting the same dimension at both ends of a dimension stack, which will create a "dimension loop" instead of a stack.
The vanilla dimension ids are:
- -1: Nether
- 0: Overworld
- 1: End
Ids for modded dimensions can be usually found in their respective config file or documentation.
Note that dimensions are often bordered by Bedrock layers which have to be removed to make the portals passable (see Bedrock Removal).
Sometimes you may want the upper portal layer in a dimension to be generated at a different height than 255. This can be achieved by either changing the value of the (global) dim_ceiling variable which changes the height for all dimensions.
Or by adding the following line into the PRE_INIT() section:
dim_ceiling:<dimId> = <newHeight>;
This will set the portal height to <newHeight>, but only for the dimension with id <dimId>.
The bottom portals are always generated at height 0 which can't be changed.
PRE_INIT() {
add("dimstack", [-1, 0]#);
!puts Overworld on top of nether
dim_ceiling:-1 = 127;
!lower the ceiling portal layer in the nether to Y-level 127 (which is the same height as the upper bedrock layer)
add("dimstack", [1, 1]#);
!loops The End into itself (so when you fall out the bottom you enter back through the top)
...
}