Class ModelLoaderRegistry

java.lang.Object
net.minecraftforge.client.model.ModelLoaderRegistry

public class ModelLoaderRegistry extends Object
Central hub for custom model loaders.
  • Field Details

  • Constructor Details

    • ModelLoaderRegistry

      public ModelLoaderRegistry()
  • Method Details

    • init

      public static void init()
    • onModelLoadingStart

      public static void onModelLoadingStart()
      INTERNAL METHOD, DO NOT CALL
    • afterFirstReload

      @Deprecated public static void afterFirstReload()
      Deprecated.
      Internal method, only present for enabling legacy behavior of automatic registration of model loaders as resource reload listeners.
    • registerLoader

      public static void registerLoader(ResourceLocation id, IModelLoader<?> loader)
      Makes system aware of your loader.
      Must be called from within ModelRegistryEvent

      Note: This method currently registers the model loader as a resource reload listener automatically, if it is not already registered. This behavior is deprecated and will be removed in the future. If the model loader needs to be a resource reload listener as well, use RegisterClientReloadListenersEvent.
    • getModel

      public static IModelGeometry<?> getModel(ResourceLocation loaderId, com.google.gson.JsonDeserializationContext deserializationContext, com.google.gson.JsonObject data)
    • deserializeGeometry

      @Nullable public static IModelGeometry<?> deserializeGeometry(com.google.gson.JsonDeserializationContext deserializationContext, com.google.gson.JsonObject object)
    • resolveTexture

      public static Material resolveTexture(@Nullable String tex, IModelConfiguration owner)
    • blockMaterial

      public static Material blockMaterial(String location)
    • blockMaterial

      public static Material blockMaterial(ResourceLocation location)
    • deserializeModelTransforms

      @Nullable public static ModelState deserializeModelTransforms(com.google.gson.JsonDeserializationContext deserializationContext, com.google.gson.JsonObject modelData)
    • deserializeTransform

      public static Optional<ModelState> deserializeTransform(com.google.gson.JsonDeserializationContext context, com.google.gson.JsonElement transformData)
    • bakeHelper

      public static BakedModel bakeHelper(BlockModel blockModel, ModelBakery modelBakery, BlockModel otherModel, Function<Material,TextureAtlasSprite> spriteGetter, ModelState modelTransform, ResourceLocation modelLocation, boolean guiLight3d)