public class ResourceLoader
extends java.lang.Object
| Constructor and Description |
|---|
ResourceLoader() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addResourceLocation(ResourceLocation location)
Add a location that will be searched for resources
|
static java.net.URL |
getResource(java.lang.String ref)
Get a resource as a URL
|
static java.io.InputStream |
getResourceAsStream(java.lang.String ref)
Get a resource
|
static void |
removeAllResourceLocations()
Remove all the locations, no resources will be found until
new locations have been added
|
static void |
removeResourceLocation(ResourceLocation location)
Remove a location that will be no longer be searched for resources
|
static boolean |
resourceExists(java.lang.String ref)
Check if a resource is available from any given resource loader
|
public static void addResourceLocation(ResourceLocation location)
location - The location that will be searched for resorucespublic static void removeResourceLocation(ResourceLocation location)
location - The location that will be removed from the search listpublic static void removeAllResourceLocations()
public static java.io.InputStream getResourceAsStream(java.lang.String ref)
throws java.io.FileNotFoundException
ref - The reference to the resource to retrievejava.io.FileNotFoundException - if no resource is found for the referencepublic static boolean resourceExists(java.lang.String ref)
ref - A reference to the resource that should be checkedpublic static java.net.URL getResource(java.lang.String ref)
throws java.io.FileNotFoundException
ref - The reference to the resource to retrievejava.io.FileNotFoundException - if no resource is found for the reference