Package net.minecraftforge.client.model
Class ModelLoaderRegistry
java.lang.Object
net.minecraftforge.client.model.ModelLoaderRegistry
Central hub for custom model loaders.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Pattern
private static final ItemModelGenerator
private static final Map<ResourceLocation,
IModelLoader<?>> private static boolean
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic IBakedModel
bakeHelper
(BlockModel blockModel, ModelBakery modelBakery, BlockModel otherModel, Function<RenderMaterial, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform, ResourceLocation modelLocation, boolean guiLight3d) static RenderMaterial
blockMaterial
(String location) static RenderMaterial
blockMaterial
(ResourceLocation location) static IModelGeometry<?>
deserializeGeometry
(com.google.gson.JsonDeserializationContext deserializationContext, com.google.gson.JsonObject object) static IModelTransform
deserializeModelTransforms
(com.google.gson.JsonDeserializationContext deserializationContext, com.google.gson.JsonObject modelData) static Optional<IModelTransform>
deserializeTransform
(com.google.gson.JsonDeserializationContext context, com.google.gson.JsonElement transformData) private static void
deserializeTRSR
(com.google.gson.JsonDeserializationContext context, EnumMap<ItemCameraTransforms.TransformType, TransformationMatrix> transforms, com.google.gson.JsonObject transform, String name, ItemCameraTransforms.TransformType itemCameraTransform) static IModelGeometry<?>
getModel
(ResourceLocation loaderId, com.google.gson.JsonDeserializationContext deserializationContext, com.google.gson.JsonObject data) static void
init()
static void
INTERNAL METHOD, DO NOT CALLstatic void
registerLoader
(ResourceLocation id, IModelLoader<?> loader) Makes system aware of your loader.static RenderMaterial
resolveTexture
(String tex, IModelConfiguration owner)
-
Field Details
-
WHITE_TEXTURE
- See Also:
-
ITEM_MODEL_GENERATOR
-
loaders
-
registryFrozen
private static volatile boolean registryFrozen -
FILESYSTEM_PATH_TO_RESLOC
-
-
Constructor Details
-
ModelLoaderRegistry
public ModelLoaderRegistry()
-
-
Method Details
-
init
public static void init() -
onModelLoadingStart
public static void onModelLoadingStart()INTERNAL METHOD, DO NOT CALL -
registerLoader
Makes system aware of your loader. Must be called from withinModelRegistryEvent
-
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
-
blockMaterial
-
blockMaterial
-
deserializeModelTransforms
@Nullable public static IModelTransform deserializeModelTransforms(com.google.gson.JsonDeserializationContext deserializationContext, com.google.gson.JsonObject modelData) -
deserializeTransform
public static Optional<IModelTransform> deserializeTransform(com.google.gson.JsonDeserializationContext context, com.google.gson.JsonElement transformData) -
deserializeTRSR
private static void deserializeTRSR(com.google.gson.JsonDeserializationContext context, EnumMap<ItemCameraTransforms.TransformType, TransformationMatrix> transforms, com.google.gson.JsonObject transform, String name, ItemCameraTransforms.TransformType itemCameraTransform) -
bakeHelper
public static IBakedModel bakeHelper(BlockModel blockModel, ModelBakery modelBakery, BlockModel otherModel, Function<RenderMaterial, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform, ResourceLocation modelLocation, boolean guiLight3d)
-