Interface ModelResourceProvider

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@Deprecated @FunctionalInterface public interface ModelResourceProvider
Deprecated.
Use ModelLoadingPlugin and related classes instead.
Interface for model resource providers.

Model resource providers hook the loading of model *files* from the resource tree; that is, in vanilla, it handles going from "minecraft:block/stone" to a "assets/minecraft/models/block/stone.json" file.

This is where you want to add your own custom model formats.

As providers are instantiated with a new provider, it is safe (and recommended!) to cache information inside a loader.

Keep in mind that only *one* ModelResourceProvider may respond to a given model at any time. If you're writing, say, an OBJ loader, this means you could easily conflict with another OBJ loader unless you take some precautions, for example:

  • Only load files with a mod-suffixed name, such as .architect.obj,
  • Only load files from an explicit list of namespaces, registered elsewhere.