public class ModelLoaderRegistry
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ModelLoaderRegistry.LoaderException |
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<ResourceLocation,ResourceLocation> |
aliases |
private static java.util.Map<ResourceLocation,IModel> |
cache |
private static java.util.Set<ICustomModelLoader> |
loaders |
private static java.util.Deque<ResourceLocation> |
loadingModels |
private static IResourceManager |
manager |
private static java.util.Set<ResourceLocation> |
textures |
Constructor and Description |
---|
ModelLoaderRegistry() |
Modifier and Type | Method and Description |
---|---|
(package private) static void |
addAlias(ResourceLocation from,
ResourceLocation to) |
static void |
clearModelCache(IResourceManager manager) |
static ResourceLocation |
getActualLocation(ResourceLocation location) |
static IModel |
getMissingModel() |
(package private) static IModel |
getMissingModel(ResourceLocation location,
java.lang.Throwable cause) |
static IModel |
getModel(ResourceLocation location)
Primary method to get IModel instances.
|
static IModel |
getModelOrLogError(ResourceLocation location,
java.lang.String error)
Use this if you want the model, but need to log the error.
|
static IModel |
getModelOrMissing(ResourceLocation location)
Use this if you don't care about the exception and want some model anyway.
|
(package private) static java.lang.Iterable<ResourceLocation> |
getTextures() |
static IAnimationStateMachine |
loadASM(ResourceLocation location,
com.google.common.collect.ImmutableMap<java.lang.String,ITimeValue> customParameters) |
static boolean |
loaded(ResourceLocation location) |
static void |
registerLoader(ICustomModelLoader loader) |
private static final java.util.Set<ICustomModelLoader> loaders
private static final java.util.Map<ResourceLocation,IModel> cache
private static final java.util.Deque<ResourceLocation> loadingModels
private static final java.util.Set<ResourceLocation> textures
private static final java.util.Map<ResourceLocation,ResourceLocation> aliases
private static IResourceManager manager
public static void registerLoader(ICustomModelLoader loader)
public static boolean loaded(ResourceLocation location)
public static ResourceLocation getActualLocation(ResourceLocation location)
public static IModel getModel(ResourceLocation location) throws java.lang.Exception
java.lang.Exception
public static IModel getModelOrMissing(ResourceLocation location)
public static IModel getModelOrLogError(ResourceLocation location, java.lang.String error)
public static IModel getMissingModel()
static IModel getMissingModel(ResourceLocation location, java.lang.Throwable cause)
static void addAlias(ResourceLocation from, ResourceLocation to)
public static void clearModelCache(IResourceManager manager)
static java.lang.Iterable<ResourceLocation> getTextures()
public static IAnimationStateMachine loadASM(ResourceLocation location, com.google.common.collect.ImmutableMap<java.lang.String,ITimeValue> customParameters)