public final class ModelLoader extends ModelBakery
Modifier and Type | Class and Description |
---|---|
protected class |
ModelLoader.BakedModelCacheKey |
static class |
ModelLoader.ItemLoadingException
16x16 pure white sprite.
|
protected static class |
ModelLoader.VanillaLoader
Adapter from the vanilla json model loader to a custom model loader
|
protected static class |
ModelLoader.VariantLoader
Exposes the blockstate json loader as a custom model loader
|
static class |
ModelLoader.White |
LOCATION_DESTROY_STAGE_0, LOCATION_DESTROY_STAGE_1, LOCATION_DESTROY_STAGE_2, LOCATION_DESTROY_STAGE_3, LOCATION_DESTROY_STAGE_4, LOCATION_DESTROY_STAGE_5, LOCATION_DESTROY_STAGE_6, LOCATION_DESTROY_STAGE_7, LOCATION_DESTROY_STAGE_8, LOCATION_DESTROY_STAGE_9, LOCATION_FIRE_0, LOCATION_FIRE_1, LOCATION_LAVA_FLOW, LOCATION_WATER_FLOW, LOCATION_WATER_OVERLAY, LOCATIONS_BUILTIN_TEXTURES, MISSING_MODEL_MESH, MODEL_ENTITY, MODEL_GENERATED, MODEL_MISSING, resourceManager, textureMap
Constructor and Description |
---|
ModelLoader(IResourceManager manager,
AtlasTexture map,
BlockColors colours,
IProfiler profiler) |
Modifier and Type | Method and Description |
---|---|
static void |
addSpecialModel(ResourceLocation rl)
Indicate to vanilla that it should load and bake the given model, even if no blocks or
items use it.
|
static java.util.function.Function<ResourceLocation,IUnbakedModel> |
defaultModelGetter() |
static java.util.function.Function<ResourceLocation,TextureAtlasSprite> |
defaultTextureGetter()
Get the default texture getter the models will be baked with.
|
static ModelResourceLocation |
getInventoryVariant(java.lang.String s)
Hooked from ModelBakery, allows using MRLs that don't end with "inventory" for items.
|
protected IUnbakedModel |
getMissingModel() |
protected ResourceLocation |
getModelLocation(ResourceLocation model) |
java.util.Set<ResourceLocation> |
getSpecialModels() |
boolean |
isLoading() |
void |
onPostBakeEvent(java.util.Map<ResourceLocation,IBakedModel> modelRegistry)
Internal, do not use.
|
func_217844_a, func_217845_a, func_217846_a, func_225354_b, getBakedModel, getUnbakedModel, loadModel, processLoading
public ModelLoader(IResourceManager manager, AtlasTexture map, BlockColors colours, IProfiler profiler)
public boolean isLoading()
public static void addSpecialModel(ResourceLocation rl)
ModelRegistryEvent
rl
- The model, either ModelResourceLocation
to point to a blockstate variant,
or plain ResourceLocation
to point directly to a json in the models folder.public java.util.Set<ResourceLocation> getSpecialModels()
getSpecialModels
in class ModelBakery
public static ModelResourceLocation getInventoryVariant(java.lang.String s)
protected ResourceLocation getModelLocation(ResourceLocation model)
protected IUnbakedModel getMissingModel()
public void onPostBakeEvent(java.util.Map<ResourceLocation,IBakedModel> modelRegistry)
public static java.util.function.Function<ResourceLocation,TextureAtlasSprite> defaultTextureGetter()
public static java.util.function.Function<ResourceLocation,IUnbakedModel> defaultModelGetter()