Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement world parallel dimension system #6655

Open
dktapps opened this issue Mar 16, 2025 · 0 comments
Open

Implement world parallel dimension system #6655

dktapps opened this issue Mar 16, 2025 · 0 comments
Labels
Category: Gameplay Related to Minecraft gameplay experience Type: Enhancement Contributes features or other improvements to PocketMine-MP

Comments

@dktapps
Copy link
Member

dktapps commented Mar 16, 2025

Problem description

This was slated for addition since 2015, but it got lost by the wayside because core improvements have taken priority for years.

I'm not planning to work on this, but I figured it would be best to write up an overview of the problems that need to be solved in case someone else wants to take a crack at this.

There are a few obstacles to this:

  • World metadata such as gamerules, time and probably other things? needs to be synchronized between all dimensions
  • We need to support loading dimension chunks from a central DB shared by all dimensions as per Bedrock's world format
  • Every overworld will get its own nether and end

Proposed solution

Worlds are already effectively dimensions. This means that most of the hard work is already done, as all the core code is aware of multi-world.

However, Worlds currently have no capacity to synchronize metadata. They also have no way to change the sky color or world height (nether is 128, end is 256). This will need to be solved.

Something like the following:

  • Dimensions to be represented by World
  • Shared data structures for time, gamerules etc. with callback support to allow each linked world to respond when one of them changes metadata of the world
  • Adding enum DimensionType{ OVERWORLD, NETHER, THE_END } (although we may also want to consider allowing custom dimensions?)
  • Adding World->getParallelDimensions() : array<Dimension, World>
  • Adding World->getDimensionType() : enum DimensionType
  • Adding World->getParallelDimension(DimensionType $dimension) : ?World - returns the linked overworld, nether or end dimension for this world if it's loaded
  • Adding World->loadParallelDimension(DimensionType $dimension) : World

Portals will then use World->loadParallelDimension($targetDimension) to get the destination for their transit.

Probably we'll need some shared object structure to encapsulate the dimension array so changes to it can be reflected in all linked worlds.

Alternative solutions or workarounds

No response

@dktapps dktapps added Category: Gameplay Related to Minecraft gameplay experience Type: Enhancement Contributes features or other improvements to PocketMine-MP labels Mar 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Gameplay Related to Minecraft gameplay experience Type: Enhancement Contributes features or other improvements to PocketMine-MP
Projects
None yet
Development

No branches or pull requests

1 participant