Unable to register a ConfiguredFeature in 1.19.3
Caused by: java.lang.ClassNotFoundException: dev.architectury.registry.registries.Registries at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:226) at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:145) Caused by: java.lang.ClassNotFoundException: dev.architectury.registry.registries.Registries
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ... 14 moreCaused by: java.lang.NullPointerException: Registry ResourceKey[minecraft:root / minecraft:worldgen/configured_feature] not found! at java.base/java.util.Objects.requireNonNull(Objects.java:233) Caused by: java.lang.NullPointerException: Registry ResourceKey[minecraft:root / minecraft:worldgen/configured_feature] not found!
at dev.architectury.registry.registries.fabric.RegistrarManagerImpl$RegistryProviderImpl.get(RegistrarManagerImpl.java:78) at dev.architectury.registry.registries.RegistrarManager.get(RegistrarManager.java:52) at dev.architectury.registry.registries.DeferredRegister.getRegistrar(DeferredRegister.java:90) at dev.architectury.registry.registries.DeferredRegister.register(DeferredRegister.java:74)
ConfiguredFeature register method has been changed, and apparently no longer uses a Registry<T>
Yes, ConfiguredFeature is now purely a datapack registry, and BuiltinRegistries no longer exists, so you cannot use DeferredRegisters for registering them anymore either. We're still dealing with the fallout of this change ourselves, and you might see changes in Architectury that may allow you to register datapack registry contents through code still (as that is still a valid use case for, say, dynamically generated code-based features)
I noticed this shortly afterwards, however from what I saw the vanilla Placed Features and Configured Features are still registered in a different way in the game code, using the BootstapContext<> to get it
Unfortunately, the whole bootstrapping and RegistryBuilder concept is only used for datagen
Very sad to have to redo everything in .json or wait for an alternative
A similiar error causes my game to crash on mod loading: crash-2023-01-18_15.55.38-client.txt
same error
Caused by: java.lang.NullPointerException: Registry ResourceKey[minecraft:root / minecraft:worldgen/configured_feature] not found!