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
    • registerLoader

      public static void registerLoader(ResourceLocation id, IModelLoader<?> loader)
      Makes system aware of your loader. Must be called from within ModelRegistryEvent
    • 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)
    • deserializeTRSR

      private static void deserializeTRSR(com.google.gson.JsonDeserializationContext context, EnumMap<ItemTransforms.TransformType,​Transformation> transforms, com.google.gson.JsonObject transform, String name, ItemTransforms.TransformType itemCameraTransform)
    • bakeHelper

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