Modifier and Type | Field and Description |
---|---|
private java.io.InputStream |
inputStream |
private ResourceLocation |
location |
private static org.apache.logging.log4j.Logger |
LOGGER |
private java.io.InputStream |
metadataInputStream |
private com.google.gson.JsonObject |
metadataJson |
private java.lang.String |
packName |
static java.util.concurrent.Executor |
RESOURCE_IO_EXECUTOR |
private boolean |
wasMetadataRead |
Constructor and Description |
---|
SimpleResource(java.lang.String packNameIn,
ResourceLocation locationIn,
java.io.InputStream inputStreamIn,
java.io.InputStream metadataInputStreamIn) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
equals(java.lang.Object p_equals_1_) |
java.io.InputStream |
getInputStream() |
ResourceLocation |
getLocation() |
<T> T |
getMetadata(IMetadataSectionSerializer<T> serializer) |
java.lang.String |
getPackName() |
int |
hashCode() |
boolean |
hasMetadata() |
private static final org.apache.logging.log4j.Logger LOGGER
public static final java.util.concurrent.Executor RESOURCE_IO_EXECUTOR
private final java.lang.String packName
private final ResourceLocation location
private final java.io.InputStream inputStream
private final java.io.InputStream metadataInputStream
private boolean wasMetadataRead
private com.google.gson.JsonObject metadataJson
public SimpleResource(java.lang.String packNameIn, ResourceLocation locationIn, java.io.InputStream inputStreamIn, @Nullable java.io.InputStream metadataInputStreamIn)
public ResourceLocation getLocation()
getLocation
in interface IResource
public java.io.InputStream getInputStream()
getInputStream
in interface IResource
public boolean hasMetadata()
@Nullable public <T> T getMetadata(IMetadataSectionSerializer<T> serializer)
getMetadata
in interface IResource
public java.lang.String getPackName()
getPackName
in interface IResource
public boolean equals(java.lang.Object p_equals_1_)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException