@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 ResourcePackIOExceptionpublic InputStream open(ResourceType type, Identifier id) throws IOException
open in interface ResourcePackIOExceptionpublic Collection<Identifier> findResources(ResourceType type, String namespace, String prefix, int maxDepth, Predicate<String> pathFilter)
findResources in interface ResourcePackpublic boolean contains(ResourceType type, Identifier id)
contains in interface ResourcePackpublic Set<String> getNamespaces(ResourceType type)
getNamespaces in interface ResourcePack@Nullable public <T> T parseMetadata(ResourceMetadataReader<T> metaReader)
parseMetadata in interface ResourcePackpublic String getName()
getName in interface ResourcePackpublic void close()
close in interface AutoCloseableclose in interface ResourcePack