mojira.dev
MC-250212

Custom world import settings always fails with "Error Importing Settings"

When attempting to import a valid world settings json generated by "Export World Generation Settings" or custom-written, import always fails with the message:

Error Importing Settings

Can't load registry with this ops

Steps to Reproduce:

  1. Generate a world with default settings.

  2. Export world generation settings from that world.

  3. Start creating a new world.

  4. Use "More World Options" > "Import Settings" to select the newly-exported settings.

This workflow functions correctly in 1.18.2

Code analysis
@unknown: see code analysis in this comment.

Attachments

Comments 6

Relates to MC-205877 (similar cause)

Code analysis (yarn 1.19):

RegistryCodecs#createRegistryDecoder expects the registry loader access to be available. A RegistryOps has associated RegistryLoader$LoaderAccess if it is constructed with either of the ofLoaded methods that take DynamicRegistryManager$Mutable.

However, MoreOptionsDialog uses RegistryOps.of which creates the ops without loader access, so decoding fails with that. It's not possible to just switch the call, though, as the dynamic registry manager available there is immutable, and RegistryLoader needs mutable registry manager to load the dynamic registry when needed.

Can confirm in 1.19.1

Can confirm in 1.19.2

@apple502j 

I think it's reasonable that MoreOptionsDialog has no loader access, because there's no data pack before creating the world. When importing, the dimension list in the setting file should be decoded as a map rather than overrided by data packs.

Keith Beckman

(Unassigned)

Community Consensus

Normal

Custom Worlds

22w15a, 1.19, 1.19.1, 1.19.2

22w42a

Retrieved