public interface ICustomModelLoader extends ISelectiveResourceReloadListener
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(ResourceLocation modelLocation) |
IModel |
loadModel(ResourceLocation modelLocation) |
void |
onResourceManagerReload(IResourceManager resourceManager) |
default void |
onResourceManagerReload(IResourceManager resourceManager,
java.util.function.Predicate<IResourceType> resourcePredicate)
A version of onResourceManager that selectively chooses
IResourceType s
to reload. |
void onResourceManagerReload(IResourceManager resourceManager)
onResourceManagerReload
in interface IResourceManagerReloadListener
onResourceManagerReload
in interface ISelectiveResourceReloadListener
default void onResourceManagerReload(IResourceManager resourceManager, java.util.function.Predicate<IResourceType> resourcePredicate)
ISelectiveResourceReloadListener
IResourceType
s
to reload.
When using this, the given predicate should be called to ensure the relevant resources should
be reloaded at this time.onResourceManagerReload
in interface ISelectiveResourceReloadListener
resourceManager
- the resource manager being reloadedresourcePredicate
- predicate to test whether any given resource type should be reloadedboolean accepts(ResourceLocation modelLocation)
IModel loadModel(ResourceLocation modelLocation) throws java.lang.Exception
java.lang.Exception