2727import java .io .InputStream ;
2828import java .nio .file .Files ;
2929import java .nio .file .Path ;
30+ import java .io .*;
31+ import java .nio .charset .StandardCharsets ;
3032import java .util .*;
3133import java .util .function .Function ;
3234import java .util .stream .Collectors ;
@@ -274,7 +276,7 @@ && handleRedirect(ident, entry.getKey(), entry.getValue()).canLoad()) {
274276 }
275277
276278 @ Override
277- public void listResources (PackType type , String pathIn , String namespace , PackResources .ResourceOutput output ) {
279+ public void listResources (PackType type , String namespace , String pathIn , PackResources .ResourceOutput output ) {
278280 //TODO list all redirect/conditional resources, may need new parameters in API?
279281 final String folder = pathIn + "/" ; // Ensure folders
280282 DIRECT_RESOURCES .forEach ((k , v ) -> {
@@ -375,7 +377,12 @@ public IoSupplier<InputStream> getResource(PackType type, ResourceLocation loc)
375377
376378 private InputStream getResource (String resourcePath ) throws IOException {
377379 if ("pack.mcmeta" .equals (resourcePath )) {
378- return new ByteArrayInputStream ("{}" .getBytes ());
380+ return new ByteArrayInputStream (("{\n " +
381+ " \" pack\" : {\n " +
382+ " \" description\" : \" UMC Generated Data\" ,\n " +
383+ " \" pack_format\" : 12\n " +
384+ " }\n " +
385+ "}" ).getBytes (StandardCharsets .UTF_8 ));
379386 }
380387
381388 return new ByteArrayInputStream (data .get (nameToLocation (resourcePath ).internal ));
@@ -386,7 +393,7 @@ private boolean hasResource(String resourcePath) {
386393 }
387394
388395 @ Override
389- public void listResources (PackType type , String pathIn , String namespace , PackResources .ResourceOutput output ) {
396+ public void listResources (PackType type , String namespace , String pathIn , PackResources .ResourceOutput output ) {
390397 List <ResourceLocation > result = new ArrayList <>();
391398 final String folder = pathIn + "/" ; // Ensure folders
392399 data .keySet ().forEach ((k ) -> {
0 commit comments