--- a/net/minecraft/data/info/RegistryDumpReport.java
+++ b/net/minecraft/data/info/RegistryDumpReport.java
@@ -35,7 +35,7 @@
             jsonobject.addProperty("default", resourcelocation.toString());
         }
 
-        int i = BuiltInRegistries.REGISTRY.getId(p_124059_);
+        int i = ((Registry<Registry<T>>)BuiltInRegistries.REGISTRY).getId(p_124059_);
         jsonobject.addProperty("protocol_id", i);
         JsonObject jsonobject1 = new JsonObject();
         p_124059_.holders().forEach(p_211092_ -> {
