Class SimpleResource
java.lang.Object
net.minecraft.server.packs.resources.SimpleResource
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Resource
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ResourceLocation
private com.google.gson.JsonObject
private final InputStream
private final InputStream
private final String
private boolean
-
Constructor Summary
ConstructorDescriptionSimpleResource
(String p_10929_, ResourceLocation p_10930_, InputStream p_10931_, InputStream p_10932_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
<T> T
getMetadata
(MetadataSectionSerializer<T> p_10935_) int
hashCode()
boolean
-
Field Details
-
sourceName
-
location
-
resourceStream
-
metadataStream
-
triedMetadata
private boolean triedMetadata -
metadata
private com.google.gson.JsonObject metadata
-
-
Constructor Details
-
SimpleResource
public SimpleResource(String p_10929_, ResourceLocation p_10930_, InputStream p_10931_, @Nullable InputStream p_10932_)
-
-
Method Details
-
getLocation
- Specified by:
getLocation
in interfaceResource
-
getInputStream
- Specified by:
getInputStream
in interfaceResource
-
hasMetadata
public boolean hasMetadata()- Specified by:
hasMetadata
in interfaceResource
-
getMetadata
- Specified by:
getMetadata
in interfaceResource
-
getSourceName
- Specified by:
getSourceName
in interfaceResource
-
equals
-
hashCode
public int hashCode() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-