2222import java .io .File ;
2323import java .io .IOException ;
2424import java .io .InputStream ;
25+ import java .io .*;
26+ import java .nio .charset .StandardCharsets ;
2527import java .util .*;
2628import java .util .function .Function ;
2729import java .util .function .Predicate ;
@@ -256,7 +258,7 @@ && handleRedirect(ident, entry.getKey(), entry.getValue()).canLoad()) {
256258 }
257259
258260 @ Override
259- public Collection <ResourceLocation > getResources (PackType type , String pathIn , String namespace , int maxDepth , Predicate <String > filter ) {
261+ public Collection <ResourceLocation > getResources (PackType type , String namespace , String pathIn , int maxDepth , Predicate <String > filter ) {
260262 //TODO list all redirect/conditional resources, may need new parameters in API?
261263 List <ResourceLocation > result = new ArrayList <>();
262264 final String folder = pathIn + "/" ; // Ensure folders
@@ -359,7 +361,12 @@ public InternalDataPack() {
359361 @ Override
360362 public InputStream getResource (String resourcePath ) throws IOException {
361363 if ("pack.mcmeta" .equals (resourcePath )) {
362- return new ByteArrayInputStream ("{}" .getBytes ());
364+ return new ByteArrayInputStream (("{\n " +
365+ " \" pack\" : {\n " +
366+ " \" description\" : \" UMC Generated Data\" ,\n " +
367+ " \" pack_format\" : 7\n " +
368+ " }\n " +
369+ "}" ).getBytes (StandardCharsets .UTF_8 ));
363370 }
364371
365372 return new ByteArrayInputStream (data .get (nameToLocation (resourcePath ).internal ));
@@ -371,7 +378,7 @@ public boolean hasResource(String resourcePath) {
371378 }
372379
373380 @ Override
374- public Collection <ResourceLocation > getResources (PackType type , String pathIn , String namespace , int maxDepth , Predicate <String > filter ) {
381+ public Collection <ResourceLocation > getResources (PackType type , String namespace , String pathIn , int maxDepth , Predicate <String > filter ) {
375382 List <ResourceLocation > result = new ArrayList <>();
376383 final String folder = pathIn + "/" ; // Ensure folders
377384 data .keySet ().forEach ((k ) -> {
0 commit comments