Interface PreparableModelLoadingPlugin<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A model loading plugin is used to extend the model loading process through the passed
ModelLoadingPlugin.Context
object.
This version of ModelLoadingPlugin
allows loading ("preparing") some data off-thread in parallel before
the model loading process starts. Usually, this means loading some resources from the provided
ResourceManager
.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onInitializeModelLoader
(T data, ModelLoadingPlugin.Context pluginContext) Called towards the beginning of the model loading process, every time resource are (re)loaded.static <T> void
register
(PreparableModelLoadingPlugin.DataLoader<T> loader, PreparableModelLoadingPlugin<T> plugin) Registers a preparable model loading plugin.
-
Method Details
-
register
static <T> void register(PreparableModelLoadingPlugin.DataLoader<T> loader, PreparableModelLoadingPlugin<T> plugin) Registers a preparable model loading plugin. -
onInitializeModelLoader
Called towards the beginning of the model loading process, every time resource are (re)loaded. Use the context object to extend model loading as desired.- Parameters:
data
- The data loaded by thePreparableModelLoadingPlugin.DataLoader
.pluginContext
- The context that can be used to extend model loading.
-