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 void
Deprecated.static BakedModel
bakeHelper
(BlockModel blockModel, ModelBakery modelBakery, BlockModel otherModel, Function<Material, TextureAtlasSprite> spriteGetter, ModelState modelTransform, ResourceLocation modelLocation, boolean guiLight3d) static Material
blockMaterial
(String location) static Material
blockMaterial
(ResourceLocation location) static IModelGeometry<?>
deserializeGeometry
(com.google.gson.JsonDeserializationContext deserializationContext, com.google.gson.JsonObject object) static ModelState
deserializeModelTransforms
(com.google.gson.JsonDeserializationContext deserializationContext, com.google.gson.JsonObject modelData) static Optional<ModelState>
deserializeTransform
(com.google.gson.JsonDeserializationContext context, com.google.gson.JsonElement transformData) 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.
Must be called from withinModelRegistryEvent
Note: This method currently registers the model loader as a resource reload listener automatically, if it is not already registered.static Material
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 -
afterFirstReload
Deprecated.Internal method, only present for enabling legacy behavior of automatic registration of model loaders as resource reload listeners. -
registerLoader
Makes system aware of your loader.
Must be called from withinModelRegistryEvent
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, useRegisterClientReloadListenersEvent
. -
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 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)
-