Interface UnbakedModelLoader<T extends net.minecraft.client.resources.model.UnbakedModel>

All Known Implementing Classes:
CompositeUnbakedModel.Loader, NewModelLoaderTest.TestLoader, ObjLoader

public interface UnbakedModelLoader<T extends net.minecraft.client.resources.model.UnbakedModel>
A loader for custom unbaked models.

If you do any caching, you should implement ResourceManagerReloadListener and register it with AddClientReloadListenersEvent.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    read(com.google.gson.JsonObject jsonObject, com.google.gson.JsonDeserializationContext deserializationContext)
    Reads an unbaked model from the passed JSON object.
  • Method Details

    • read

      T read(com.google.gson.JsonObject jsonObject, com.google.gson.JsonDeserializationContext deserializationContext) throws com.google.gson.JsonParseException
      Reads an unbaked model from the passed JSON object.

      The JsonDeserializationContext argument can be used to deserialize types that the system already understands. For example, deserializationContext.deserialize(<sub object>, Transformation.class) to parse a transformation, or deserializationContext.deserialize(<sub object>, UnbakedModel.class) to parse a nested model. The set of supported types can be found in the declaration of BlockModel.GSON.

      Throws:
      com.google.gson.JsonParseException