Open marlester-dev opened 1 month ago
Seems like the error is coming from immutable builder
map here in RegistrySetBuilder$BuildState:
public static BuildState create(RegistryAccess registryAccess, Stream<ResourceKey<? extends Registry<?>>> registries) {
CompositeOwner compositeOwner = new CompositeOwner();
List<RuntimeException> list = new ArrayList();
UniversalLookup universalLookup = new UniversalLookup(compositeOwner);
ImmutableMap.Builder<ResourceLocation, HolderGetter<?>>/*the map ->*/ builder = ImmutableMap.builder();
registryAccess.registries().forEach((registryEntry) -> {
builder.put(registryEntry.key().location(), RegistrySetBuilder.wrapContextLookup(registryEntry.value().asLookup()));
});
registries.forEach((registryKey) -> {
builder.put(registryKey.location(), universalLookup);
});
return new BuildState(compositeOwner, universalLookup, builder.build(), new HashMap(), list);
}
tested on mc 1.20.1
using registry builder, custom registries are not working:
Error:
I'm creating registry keys with ResourceKey.createRegistryKey(ResourceLocation)