Interface ModelLoadingPlugin.Context
- Enclosing interface:
ModelLoadingPlugin
@NonExtendable
public static interface ModelLoadingPlugin.Context
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addModels
(Collection<? extends Identifier> ids) Adds multiple models (can beModelIdentifier
s) to the list of models that will be loaded and baked.void
addModels
(Identifier... ids) Adds one or more models (can beModelIdentifier
s) to the list of models that will be loaded and baked.Event access to monitor baked model loads and replace the loaded model.Event access to replace the unbaked model used for baking without replacing the cached model.Event access to monitor unbaked model loads and replace the loaded model.void
registerBlockStateResolver
(Block block, BlockStateResolver resolver) Registers a block state resolver for a block.Event access to register model resolvers.
-
Method Details
-
addModels
Adds one or more models (can beModelIdentifier
s) to the list of models that will be loaded and baked. -
addModels
Adds multiple models (can beModelIdentifier
s) to the list of models that will be loaded and baked. -
registerBlockStateResolver
Registers a block state resolver for a block.The block must be registered and a block state resolver must not have been previously registered for the block.
-
resolveModel
Event<ModelResolver> resolveModel()Event access to register model resolvers. -
modifyModelOnLoad
Event<ModelModifier.OnLoad> modifyModelOnLoad()Event access to monitor unbaked model loads and replace the loaded model. -
modifyModelBeforeBake
Event<ModelModifier.BeforeBake> modifyModelBeforeBake()Event access to replace the unbaked model used for baking without replacing the cached model.This is useful for mods which wish to wrap a model without affecting other models that use it as a parent (e.g. wrap a block's model into a non-
JsonUnbakedModel
class but still allow the item model to be loaded and baked without exceptions). -
modifyModelAfterBake
Event<ModelModifier.AfterBake> modifyModelAfterBake()Event access to monitor baked model loads and replace the loaded model.
-