public abstract class ResourcePack extends java.lang.Object implements IResourcePack
Modifier and Type | Field and Description |
---|---|
java.io.File |
file |
private static org.apache.logging.log4j.Logger |
LOGGER |
Constructor and Description |
---|
ResourcePack(java.io.File resourcePackFileIn) |
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
getFullPath(ResourcePackType type,
ResourceLocation location) |
protected abstract java.io.InputStream |
getInputStream(java.lang.String resourcePath) |
<T> T |
getMetadata(IMetadataSectionSerializer<T> deserializer) |
java.lang.String |
getName() |
protected static java.lang.String |
getRelativeString(java.io.File file1,
java.io.File file2) |
static <T> T |
getResourceMetadata(IMetadataSectionSerializer<T> deserializer,
java.io.InputStream inputStream) |
java.io.InputStream |
getResourceStream(ResourcePackType type,
ResourceLocation location) |
java.io.InputStream |
getRootResourceStream(java.lang.String fileName) |
protected void |
onIgnoreNonLowercaseNamespace(java.lang.String namespace) |
boolean |
resourceExists(ResourcePackType type,
ResourceLocation location) |
protected abstract boolean |
resourceExists(java.lang.String resourcePath) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAllResourceLocations, getResourceNamespaces
isHidden
private static final org.apache.logging.log4j.Logger LOGGER
public final java.io.File file
private static java.lang.String getFullPath(ResourcePackType type, ResourceLocation location)
protected static java.lang.String getRelativeString(java.io.File file1, java.io.File file2)
public java.io.InputStream getResourceStream(ResourcePackType type, ResourceLocation location) throws java.io.IOException
getResourceStream
in interface IResourcePack
java.io.IOException
public boolean resourceExists(ResourcePackType type, ResourceLocation location)
resourceExists
in interface IResourcePack
protected abstract java.io.InputStream getInputStream(java.lang.String resourcePath) throws java.io.IOException
java.io.IOException
public java.io.InputStream getRootResourceStream(java.lang.String fileName) throws java.io.IOException
getRootResourceStream
in interface IResourcePack
java.io.IOException
protected abstract boolean resourceExists(java.lang.String resourcePath)
protected void onIgnoreNonLowercaseNamespace(java.lang.String namespace)
@Nullable public <T> T getMetadata(IMetadataSectionSerializer<T> deserializer) throws java.io.IOException
getMetadata
in interface IResourcePack
java.io.IOException
@Nullable public static <T> T getResourceMetadata(IMetadataSectionSerializer<T> deserializer, java.io.InputStream inputStream)
public java.lang.String getName()
getName
in interface IResourcePack