fabric icon indicating copy to clipboard operation
fabric copied to clipboard

Generating "dimension" files is not possible.

Open theendercore opened this issue 8 months ago • 1 comments

Info

Minecraft: 1.21-pre2 Loader: 0.15.11 api: 0.99.5+1.21

Issue

When trying to add RegistryKeys.DIMENSION to Entries in FabricDynamicRegistryProvider, this error is printed out java.lang.IllegalArgumentException: Registry minecraft:dimension is not loaded from datapacks. This error happens because Entries.queuedEntries doesn't contain the Registry for DimensionOptions. Because DynamicRegistries.getDynamicRegistries() doesn't contain the Registry, which happens because DynamicRegistriesImpl.DYNAMIC_REGISTRIES is constructed with only RegistryLoader.WORLDGEN_REGISTRIES, which doesn't contain the Registry, because it's in RegistryLoader.DIMENSION_REGISTRIES.

Solution

Either add RegistryLoader.DIMENSION_REGISTRIES to DynamicRegistriesImpl.DYNAMIC_REGISTRIES or add RegistryLoader.DIMENSION_REGISTRIES to Entries.queuedEntries (Have tested this, and it seems to work)

theendercore avatar Jun 06 '24 16:06 theendercore