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 Pattern
private static ItemModelGenerator
private static Map<ResourceLocation,IModelLoader<?>>
private static boolean
static String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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)
private static void
deserializeTRSR(com.google.gson.JsonDeserializationContext context, EnumMap<ItemTransforms.TransformType,Transformation> transforms, com.google.gson.JsonObject transform, String name, ItemTransforms.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 Material
resolveTexture(String tex, IModelConfiguration owner)
-
Field Details
-
WHITE_TEXTURE
- See Also:
- Constant Field Values
-
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 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)
-