mojira.dev
MC-187364

Disabling and enabling dimension datapack disables nether and end

1. Add testpack2 datapack and create world: 4 dims with overworld, custom:lol, end, nether
2. Verify this by doing `/execute in <tab>`
3. Disable pack and rejoin: 1 dim overworld
4. Enable pack and rejoin: 2 dims with overworld and custom:lol
5. Notice that the end and nether no longer exist

Datapack was sourced from https://github.com/RainWarrior/test/tree/sure

Attachments

Comments 1

This bug is still present in 1.16.2. Here is a video of me using a datapack in unmodded Minecraft and when I removed the datapack, the end went missing even though the datapack only makes a new dimension called "the_nether_2"
Video: https://streamable.com/o3cnq8
Datapack: 

[media]

A friend looked into it and seems to be dependent on the order of the dimensions processed in this line of code in GeneratorOptions.CODEC (yarn names. Let me know if I should convert it to mojmap)

SimpleRegistry.createCodec(Registry.DIMENSION_OPTIONS, Lifecycle.stable(), DimensionOptions.CODEC).xmap(DimensionOptions::method_29569, Function.identity()).fieldOf("dimensions")

Here, the vanilla dimensions are returned missing when DimensionOptions#method_29569 is called it seems. The codec here might be the issue. The desired behavior is that the codec serializes all the dimensions that exists and skips the ones that do not exist in the DIMENSION_OPTIONS registry.

 

onnowhere

(Unassigned)

Confirmed

Very Important

Custom Worlds, Data Packs

1.16 Pre-release 1

1.16 Pre-release 2

Retrieved