public abstract class AbstractResourcePack extends java.lang.Object implements IResourcePack
Modifier and Type | Field and Description |
---|---|
private static org.apache.logging.log4j.Logger |
LOGGER |
protected java.io.File |
resourcePackFile |
Constructor and Description |
---|
AbstractResourcePack(java.io.File resourcePackFileIn) |
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getInputStream(ResourceLocation location) |
protected abstract java.io.InputStream |
getInputStreamByName(java.lang.String name) |
java.awt.image.BufferedImage |
getPackImage() |
<T extends IMetadataSection> |
getPackMetadata(MetadataSerializer metadataSerializer,
java.lang.String metadataSectionName) |
java.lang.String |
getPackName() |
protected static java.lang.String |
getRelativeName(java.io.File p_110595_0_,
java.io.File p_110595_1_) |
protected abstract boolean |
hasResourceName(java.lang.String name) |
private static java.lang.String |
locationToName(ResourceLocation location) |
protected void |
logNameNotLowercase(java.lang.String name) |
(package private) static <T extends IMetadataSection> |
readMetadata(MetadataSerializer metadataSerializer,
java.io.InputStream p_110596_1_,
java.lang.String sectionName) |
boolean |
resourceExists(ResourceLocation location) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResourceDomains
private static final org.apache.logging.log4j.Logger LOGGER
protected final java.io.File resourcePackFile
public AbstractResourcePack(java.io.File resourcePackFileIn)
private static java.lang.String locationToName(ResourceLocation location)
protected static java.lang.String getRelativeName(java.io.File p_110595_0_, java.io.File p_110595_1_)
public java.io.InputStream getInputStream(ResourceLocation location) throws java.io.IOException
getInputStream
in interface IResourcePack
java.io.IOException
public boolean resourceExists(ResourceLocation location)
resourceExists
in interface IResourcePack
protected abstract java.io.InputStream getInputStreamByName(java.lang.String name) throws java.io.IOException
java.io.IOException
protected abstract boolean hasResourceName(java.lang.String name)
protected void logNameNotLowercase(java.lang.String name)
public <T extends IMetadataSection> T getPackMetadata(MetadataSerializer metadataSerializer, java.lang.String metadataSectionName) throws java.io.IOException
getPackMetadata
in interface IResourcePack
java.io.IOException
static <T extends IMetadataSection> T readMetadata(MetadataSerializer metadataSerializer, java.io.InputStream p_110596_1_, java.lang.String sectionName)
public java.awt.image.BufferedImage getPackImage() throws java.io.IOException
getPackImage
in interface IResourcePack
java.io.IOException
public java.lang.String getPackName()
getPackName
in interface IResourcePack