Interface ModelLoadingPlugin.Context

Enclosing interface:
ModelLoadingPlugin

@NonExtendable public static interface ModelLoadingPlugin.Context
  • Method Details

    • addModels

      void addModels(Identifier... ids)
      Adds one or more models (can be ModelIdentifiers) to the list of models that will be loaded and baked.
    • addModels

      void addModels(Collection<? extends Identifier> ids)
      Adds multiple models (can be ModelIdentifiers) to the list of models that will be loaded and baked.
    • registerBlockStateResolver

      void registerBlockStateResolver(Block block, BlockStateResolver resolver)
      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.