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 that will be loaded, baked, and made available throughFabricBakedModelManager.getModel(Identifier)
.void
addModels
(Identifier... ids) Adds one or more models that will be loaded, baked, and made available throughFabricBakedModelManager.getModel(Identifier)
.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 that will be loaded, baked, and made available throughFabricBakedModelManager.getModel(Identifier)
. -
addModels
Adds multiple models that will be loaded, baked, and made available throughFabricBakedModelManager.getModel(Identifier)
. -
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.
-