--- a/net/minecraft/server/packs/linkfs/LinkFSProvider.java
+++ b/net/minecraft/server/packs/linkfs/LinkFSProvider.java
@@ -85,7 +85,7 @@
                         } catch (IOException ioexception) {
                             throw new DirectoryIteratorException(ioexception);
                         }
-                    }).map(p_249891_ -> p_249891_).iterator();
+                    }).map(p_249891_ -> (Path)p_249891_).iterator();
                 }
 
                 @Override
