--- a/net/minecraft/core/registries/BuiltInRegistries.java
+++ b/net/minecraft/core/registries/BuiltInRegistries.java
@@ -297,14 +297,21 @@
         ResourceKey<? extends Registry<T>> key, R registry, BuiltInRegistries.RegistryBootstrap<T> initializer
     ) {
         Bootstrap.checkBootstrapCalled(() -> "registry " + key);
+        io.papermc.paper.registry.PaperRegistryAccess.instance().registerRegistry(registry.key(), registry); // Paper - initialize API registry
         ResourceLocation resourceLocation = key.location();
         LOADERS.put(resourceLocation, () -> initializer.run(registry));
-        WRITABLE_REGISTRY.register((ResourceKey<WritableRegistry<?>>)key, registry, RegistrationInfo.BUILT_IN);
+        WRITABLE_REGISTRY.register((ResourceKey)key, registry, RegistrationInfo.BUILT_IN); // Paper - decompile fix
         return registry;
     }
 
     public static void bootStrap() {
+        // Paper start
+        bootStrap(() -> {});
+    }
+    public static void bootStrap(Runnable runnable) {
+        // Paper end
         createContents();
+        runnable.run(); // Paper
         freeze();
         validate(REGISTRY);
     }
