package net.minecraft.server.packs;

import javax.annotation.Nullable;
import net.minecraft.server.packs.metadata.MetadataSectionSerializer;
import java.util.Set;
import java.util.Collection;
import java.util.function.Predicate;
import net.minecraft.resources.ResourceLocation;
import java.io.IOException;
import java.io.InputStream;
import java.io.Closeable;

public interface Pack extends Closeable {
    InputStream getRootResource(final String string) throws IOException;
    
    InputStream getResource(final PackType yf, final ResourceLocation sm) throws IOException;
    
    Collection<ResourceLocation> getResources(final PackType yf, final String string2, final String string3, final int integer, final Predicate<String> predicate);
    
    boolean hasResource(final PackType yf, final ResourceLocation sm);
    
    Set<String> getNamespaces(final PackType yf);
    
    @Nullable
     <T> T getMetadataSection(final MetadataSectionSerializer<T> yi) throws IOException;
    
    String getName();
}
