Class ModelLoaderRegistry


  • public class ModelLoaderRegistry
    extends java.lang.Object
    Central hub for custom model loaders.
    • Field Detail

      • registryFrozen

        private static volatile boolean registryFrozen
      • FILESYSTEM_PATH_TO_RESLOC

        private static final java.util.regex.Pattern FILESYSTEM_PATH_TO_RESLOC
    • Constructor Detail

      • ModelLoaderRegistry

        public ModelLoaderRegistry()
    • Method Detail

      • init

        public static void init()
      • onModelLoadingStart

        public static void onModelLoadingStart()
        INTERNAL METHOD, DO NOT CALL
      • 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)
      • blockMaterial

        public static RenderMaterial blockMaterial​(java.lang.String location)
      • deserializeModelTransforms

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

        public static java.util.Optional<IModelTransform> deserializeTransform​(com.google.gson.JsonDeserializationContext context,
                                                                               com.google.gson.JsonElement transformData)