Package net.minecraft.resources
Class SimpleResource
- java.lang.Object
-
- net.minecraft.resources.SimpleResource
-
-
Field Summary
Fields Modifier and Type Field Description private ResourceLocation
location
private com.google.gson.JsonObject
metadata
private java.io.InputStream
metadataStream
private java.io.InputStream
resourceStream
private java.lang.String
sourceName
private boolean
triedMetadata
-
Constructor Summary
Constructors Constructor Description SimpleResource(java.lang.String p_i47904_1_, ResourceLocation p_i47904_2_, java.io.InputStream p_i47904_3_, java.io.InputStream p_i47904_4_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
equals(java.lang.Object p_equals_1_)
java.io.InputStream
getInputStream()
ResourceLocation
getLocation()
<T> T
getMetadata(IMetadataSectionSerializer<T> p_199028_1_)
java.lang.String
getSourceName()
int
hashCode()
boolean
hasMetadata()
-
-
-
Field Detail
-
sourceName
private final java.lang.String sourceName
-
location
private final ResourceLocation location
-
resourceStream
private final java.io.InputStream resourceStream
-
metadataStream
private final java.io.InputStream metadataStream
-
triedMetadata
private boolean triedMetadata
-
metadata
private com.google.gson.JsonObject metadata
-
-
Constructor Detail
-
SimpleResource
public SimpleResource(java.lang.String p_i47904_1_, ResourceLocation p_i47904_2_, java.io.InputStream p_i47904_3_, @Nullable java.io.InputStream p_i47904_4_)
-
-
Method Detail
-
getLocation
public ResourceLocation getLocation()
- Specified by:
getLocation
in interfaceIResource
-
getInputStream
public java.io.InputStream getInputStream()
- Specified by:
getInputStream
in interfaceIResource
-
hasMetadata
public boolean hasMetadata()
-
getMetadata
@Nullable public <T> T getMetadata(IMetadataSectionSerializer<T> p_199028_1_)
- Specified by:
getMetadata
in interfaceIResource
-
getSourceName
public java.lang.String getSourceName()
- Specified by:
getSourceName
in interfaceIResource
-
equals
public boolean equals(java.lang.Object p_equals_1_)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-