Technical info: the new Mini Dimensions system ============================================== (updated for 1.19-pre.1) Release v1.19 includes a new engine tech named 'Mini Dimensions'. Mini Dimensions contain normal gameworld chunks except that they can be moved to different positions - they can also have a motion vector, and rotations on all three axes (pitch/yaw/roll). They will be rendered in the gameworld at their current position. Mini Dimensions can contain blocks, BlockEntities, and decors and these will all be rendered as normal (please report any visual differences). Mini Dimensions cannot currently contain Entities. Some example uses of Mini Dimensions: (1) Preview bulk block placement in WorldEdit (implemented) - usage: you will see this already when using WorldEdit Import Tool to place blocks from clipboard or from a schematic filename; move it around and you can see how it will look when placed (2) Elevator cars, ships, airships and other non-wheeled vehicles (initial tech demo implemented) - usage: in WorldEdit, build an example vehicle, using the Magic Wand to place a selection box around it, then type command `/we testlaunch` to see a tech demo of it moving. Note, the demo test ship entity will persist until you exit the current game, it will automatically be removed on game exit. (3) Potentially, movable or rotatable rooms... (4) Potentially, advanced physics simulation mods where groups of connected blocks will fall as one (for example, a collapsing roof) As this technology matures, we intend for all blocks and BlockEntities inside Mini Dimensions - for example, doors, chests, firepits, mechanical power blocks - to be fully functional, with the specific exceptions listed below. Certain game features are likely to be implemented in a modified way for Mini Dimensions. These include waterfalls: water falling from a Mini Dimension will simply disappear instead of spreading on the terrain beneath, think of it as dispersing in the wind. We also have no current plans to implement farmland/crop growth at all in Mini Dimensions: Mini Dimensions are not intended to be used for farmland. 1.19 will NOT include any engine tech specifically for ships or other vechicles (for example, figuring out if a set of blocks will float; steering and control mechanisms; wind or oar power). Modders are welcome to add such features in their own mods. Any ships seen in 1.19 vanilla will be only tech demos of the Mini Dimensions system. However, we do intend eventually to add ships and/or other vehicles using this tech in later game versions (after 1.19). There are no current or long-term plans to include any other full new dimensions (new world levels or other game content) in the vanilla game, but we wanted to begin now to make that at least potentially possible for mods. The engine does not yet have tech to support complete new worlds with their own worldgen, weather etc and a fully-implemented other dimension is likely an extremely challenging modding endeavor. New API code elements --------------------- * BlockPos now has a fourth position field: in addition to x, y and z there is a dimension * Dimensions.cs specifies the dimensions currently used: dimension 0 is the normal world, dimension 1 is a special dimension holding the chunks used for MovableChunks * IMiniDimension is the interface for a single Mini Dimension (for example, a vehicle, or the WorldEdit import preview): think of it as a volume within the world, up to 1024 x 1024 x 1024 blocks (the same size limit as a schematic) * EntityChunky.cs is the base class for any entity which is linked with a Mini Dimension (for example, a vehicle). For a basic implementation example, see EntityTestShip in the Creative Mod: this test entity has some simple motion and rotations, for tech demo purposes Non-coded mods should work in Mini Dimensions in the same way that vanilla blocks work. For coded mods, in general mods which are using the API do not need to add any new code to enable their blocks and block entities to work normally in Mini Dimensions, except in four ways: (1) when creating a new BlockPos() in your code, its dimension should be assigned, if you are planning to use this BlockPos to reference neighbour or nearby blocks. Sample code: "tmpPos = new BlockPos(); tmpPos.dimension = pos.dimension;". If copying an existing BlockPos, including the methods UpCopy() etc, the dimension will be automatically copied (2) when using IBlockAccessor, any position-based methods, for example GetBlock(), GetBlockId(), IsValidPos() and GetChunkAtBlockPos(), it is best now to use the overload which takes a BlockPos parameter (3) when using IBlockAccessor, if your code must still use the GetBlock(), GetBlockId(), IsValidPos() and GetChunkAtBlockPos() overloads which take x, y, z position parameters, then where possible provide the y value based calculating from your block's current position BlockPos using `pos.InternalY` instead of `pos.Y` (4) do not do your own validity checks on BlockPos x, y, z positions, instead leave that to IBlockAccessor Additional technical details: Dimension 0 is the normal world Dimension 1 is reserved for Mini Dimensions Dimensions 2-9 are reserved for future vanilla use (note, there are no current plans at all for additional dimensions or game content) Maximum dimension id is 1023 Game features such as worldgen are not supported in other dimensions, though if an ambitious mod wanted to attempt this it might be possible. For backwards compatibility, for some internal storage purposes (especially when sending BlockPos positions through the network or storing them in BlockEntity treeAttributes data), the dimension value is combined together with the Y value in a single field, `BlockPos.InternalY`. The dimension value is multiplied by GlobalConstants.DimensionSizeInChunks. In other words, this can be considered as dimension 1's block storage starting at Y value 16384, high above the Y values which are possible for the normal world. Therefore, your code can be dimension compatible if it either specifies the dimension explicitly in a BlockPos (or implicitly by copying an existing BlockPos), or if specifies a y value in the world using BlockPos.InternalY in place of BlockPos.Y. Do not do both at the same time! Dimension 1 and above may have world sizes which are different from the normal world's mapSizeX, mapSizeY and mapSizeZ: specifically dimension 1 uses the full XZ coordinate space allowed by the engine even if Dimension 0 (the normal world) has a small map size. We now specify in GlobalConstants the following maximum world sizes supported by the engine: X 67108864 (i.e. the base 2 round-numbers equivalent of 64 million or 64,000 km) Y 16384 (i.e. the base 2 round-numbers equivalent of 16k or 16 km) Z 67108864 These are unlikely to change again in the foreseeable future. The engine can in theory now support up to 1024 dimensions. Other dimensions' block storage data is stored in the same save file as existing game data. Implementation roadmap Already implemented: * Framework code for dimensions and Mini Dimensions * Rendering of Mini Dimensions in the normal world * Motion, and pitch/yaw/roll rotation, of Mini Dimensions Next steps (not currently implemented but planned for 1.19 or 1.20): * Player interaction with block entities in Mini Dimensions (for example, opening chests) * Entity physics: players able to stand inside Mini Dimensions * Realistic collisions for Mini Dimensions * 'EntityInRange' checks for block entity code in Mini Dimensions Near-term steps (not currently implemented): * Particle spawning * Sounds * Lighting (currently Mini Dimensions have a fixed lighting level of 18, which is close to full sunlight; this will look wrong if one is moved underground or into a cave or heavily shaded area) Long-term steps (not currently implemented, may never be): * Rainfall, snowfall and other weather interactions * Seasonal colours for leaves and other plants * Ice melting/freezing inside Mini Dimensions * Projectiles shot from Mini Dimensions * Projectiles shot into Mini Dimensions * Fire spreading * Entity (mob) awareness of blocks in nearby Mini Dimensions (for example, food) etc.