Class ModelEvent.RegisterStandalone
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.ModelEvent
net.neoforged.neoforge.client.event.ModelEvent.RegisterStandalone
- All Implemented Interfaces:
net.neoforged.fml.event.IModBusEvent
- Enclosing class:
ModelEvent
public static class ModelEvent.RegisterStandalone
extends ModelEvent
implements net.neoforged.fml.event.IModBusEvent
Fired when the
ModelDiscovery
is notified of dependency discovery of its top models.
Allows developers to register standalone models to be loaded, along with their dependencies.
This event is not cancellable.
This event is fired on the mod-specific event bus, only on the logical client.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.client.event.ModelEvent
ModelEvent.BakingCompleted, ModelEvent.ModifyBakingResult, ModelEvent.RegisterLoaders, ModelEvent.RegisterStandalone
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map
<StandaloneModelKey<?>, UnbakedStandaloneModel<?>> -
Constructor Summary
ConstructorsConstructorDescriptionRegisterStandalone
(Map<StandaloneModelKey<?>, UnbakedStandaloneModel<?>> modelMap) -
Method Summary
Modifier and TypeMethodDescription<T> void
register
(StandaloneModelKey<T> modelKey, StandaloneModelBaker<T> baker) Registers a model to be loaded, along with its dependencies.<T> void
register
(StandaloneModelKey<T> modelKey, UnbakedStandaloneModel<T> baker) Registers a model to be loaded, along with its dependencies.
-
Field Details
-
modelMap
-
-
Constructor Details
-
RegisterStandalone
-
-
Method Details
-
register
Registers a model to be loaded, along with its dependencies. -
register
Registers a model to be loaded, along with its dependencies.Unlike
register(StandaloneModelKey, StandaloneModelBaker)
, dependency gathering and baking is performed by anUnbakedStandaloneModel
. This allows you to depend on multiple models files at once, baking them into a single dynamic model.
-