@Environment(value=CLIENT) public class Format3ResourcePack extends Object implements ResourcePack
Modifier and Type | Field and Description |
---|---|
private Map<Identifier,Identifier> |
idMap |
static Map<Identifier,Identifier> |
NEW_TO_OLD_MAP |
private ResourcePack |
parent |
Constructor and Description |
---|
Format3ResourcePack(ResourcePack resourcePack,
Map<Identifier,Identifier> map) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
contains(ResourceType type,
Identifier id) |
Collection<Identifier> |
findResources(ResourceType type,
String namespace,
String prefix,
int maxDepth,
Predicate<String> pathFilter) |
private static Identifier |
getMetadataLocation(Identifier identifier) |
String |
getName() |
Set<String> |
getNamespaces(ResourceType type) |
private Identifier |
getRedirectedId(Identifier identifier) |
InputStream |
open(ResourceType type,
Identifier id) |
InputStream |
openRoot(String fileName) |
<T> T |
parseMetadata(ResourceMetadataReader<T> metaReader) |
public static final Map<Identifier,Identifier> NEW_TO_OLD_MAP
private final ResourcePack parent
private final Map<Identifier,Identifier> idMap
public Format3ResourcePack(ResourcePack resourcePack, Map<Identifier,Identifier> map)
private static Identifier getMetadataLocation(Identifier identifier)
private Identifier getRedirectedId(Identifier identifier)
public InputStream openRoot(String fileName) throws IOException
openRoot
in interface ResourcePack
IOException
public InputStream open(ResourceType type, Identifier id) throws IOException
open
in interface ResourcePack
IOException
public Collection<Identifier> findResources(ResourceType type, String namespace, String prefix, int maxDepth, Predicate<String> pathFilter)
findResources
in interface ResourcePack
public boolean contains(ResourceType type, Identifier id)
contains
in interface ResourcePack
public Set<String> getNamespaces(ResourceType type)
getNamespaces
in interface ResourcePack
@Nullable public <T> T parseMetadata(ResourceMetadataReader<T> metaReader)
parseMetadata
in interface ResourcePack
public String getName()
getName
in interface ResourcePack
public void close()
close
in interface AutoCloseable
close
in interface ResourcePack