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

Rewrite Dimension Logic #133

Open
gentlegiantJGC opened this issue May 27, 2021 · 0 comments
Open

Rewrite Dimension Logic #133

gentlegiantJGC opened this issue May 27, 2021 · 0 comments

Comments

@gentlegiantJGC
Copy link
Member

There are a number of issues with how we handle dimensions and it needs fixing.

Here is my research so far

Java
	forge
		1.12
			level.dat["forge"]["DimensionData"]["UsedIDs"] = [I;0, 1, 7]
				an int array of the biomes that are used.
				This relates to the DIM{X} format.
				Not sure what the 0 and 1 are for.
			
			boss data
			level.dat["Data"]["DimensionData"] = {"7": {"CustomSeed": 0L}}
			
			level.dat["Data"]["Player"]["Dimension"] = 7
				-1 = the nether
				0 = overworld
				1 = the end
		1.16
			seems to use the vanilla system
	vanilla
		before 1.16 could not have custom biomes
		1.16
			level.dat["Data"]["WorldGenSettings"]["dimensions"] = {"namespace:basename": {...}, "minecraft:overworld": {...}, ...}
				keys are string dimension ids.
						It looks like the dimension data is stored in "./dimensions/namespace/basename"
			player "Dimension" is a string
		1.17
			adds customisable min and max height values in the generator settings

Bedrock has always been numerical. 0, 1, 2 for overworld, nether and end respectively. It doesn't yet have custom dimensions.

The main issue I see is managing the switch between the numerical and namespaced string system.
We will need to look up the dimension in newer versions based on both the numerical and namespaced formats.
This means the translation/interface logic will need reworking so that it has access to this information.
When saving back entity data the dimension entry will need patching to the correct value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant