Package net.minecraftforge.client.model
Class ModelLoaderRegistry
- java.lang.Object
-
- net.minecraftforge.client.model.ModelLoaderRegistry
-
public class ModelLoaderRegistry extends java.lang.Object
Central hub for custom model loaders.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ModelLoaderRegistry.ExpandedBlockModelDeserializer
static class
ModelLoaderRegistry.VanillaProxy
-
Field Summary
Fields Modifier and Type Field Description private static java.util.regex.Pattern
FILESYSTEM_PATH_TO_RESLOC
private static ItemModelGenerator
ITEM_MODEL_GENERATOR
private static java.util.Map<ResourceLocation,IModelLoader<?>>
loaders
private static boolean
registryFrozen
static java.lang.String
WHITE_TEXTURE
-
Constructor Summary
Constructors Constructor Description ModelLoaderRegistry()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IBakedModel
bakeHelper(BlockModel blockModel, ModelBakery modelBakery, BlockModel otherModel, java.util.function.Function<RenderMaterial,TextureAtlasSprite> spriteGetter, IModelTransform modelTransform, ResourceLocation modelLocation, boolean guiLight3d)
static RenderMaterial
blockMaterial(java.lang.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 java.util.Optional<IModelTransform>
deserializeTransform(com.google.gson.JsonDeserializationContext context, com.google.gson.JsonElement transformData)
private static void
deserializeTRSR(com.google.gson.JsonDeserializationContext context, java.util.EnumMap<ItemCameraTransforms.TransformType,TransformationMatrix> transforms, com.google.gson.JsonObject transform, java.lang.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
onModelLoadingStart()
INTERNAL METHOD, DO NOT CALLstatic void
registerLoader(ResourceLocation id, IModelLoader<?> loader)
Makes system aware of your loader.static RenderMaterial
resolveTexture(java.lang.String tex, IModelConfiguration owner)
-
-
-
Field Detail
-
WHITE_TEXTURE
public static final java.lang.String WHITE_TEXTURE
- See Also:
- Constant Field Values
-
ITEM_MODEL_GENERATOR
private static final ItemModelGenerator ITEM_MODEL_GENERATOR
-
loaders
private static final java.util.Map<ResourceLocation,IModelLoader<?>> loaders
-
registryFrozen
private static volatile boolean registryFrozen
-
FILESYSTEM_PATH_TO_RESLOC
private static final java.util.regex.Pattern FILESYSTEM_PATH_TO_RESLOC
-
-
Method Detail
-
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 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
public static RenderMaterial resolveTexture(@Nullable java.lang.String tex, IModelConfiguration owner)
-
blockMaterial
public static RenderMaterial blockMaterial(java.lang.String location)
-
blockMaterial
public static RenderMaterial blockMaterial(ResourceLocation 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)
-
deserializeTRSR
private static void deserializeTRSR(com.google.gson.JsonDeserializationContext context, java.util.EnumMap<ItemCameraTransforms.TransformType,TransformationMatrix> transforms, com.google.gson.JsonObject transform, java.lang.String name, ItemCameraTransforms.TransformType itemCameraTransform)
-
bakeHelper
public static IBakedModel bakeHelper(BlockModel blockModel, ModelBakery modelBakery, BlockModel otherModel, java.util.function.Function<RenderMaterial,TextureAtlasSprite> spriteGetter, IModelTransform modelTransform, ResourceLocation modelLocation, boolean guiLight3d)
-
-