Package net.minecraftforge.client.model
Class ModelLoader
java.lang.Object
net.minecraft.client.renderer.model.ModelBakery
net.minecraftforge.client.model.ModelLoader
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic class16x16 pure white sprite.static final class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final Function<ResourceLocation,IUnbakedModel> Helper method for registering all itemstacks for given item to map to universal bucket model.private static ModelLoaderprivate booleanprivate final Map<ResourceLocation,Exception> private static final org.apache.logging.log4j.Loggerprivate IUnbakedModelprivate static Set<ResourceLocation>Fields inherited from class net.minecraft.client.renderer.model.ModelBakeryBANNER_BASE, BLOCK_ENTITY_MARKER, BREAKING_LOCATIONS, DESTROY_STAGES, DESTROY_TYPES, FIRE_0, FIRE_1, GENERATION_MARKER, LAVA_FLOW, MISSING_MODEL_LOCATION, MISSING_MODEL_MESH, NO_PATTERN_SHIELD, resourceManager, SHIELD_BASE, UNREFERENCED_TEXTURES, WATER_FLOW, WATER_OVERLAY
- 
Constructor SummaryConstructorsConstructorDescriptionModelLoader(IResourceManager manager, BlockColors colours, IProfiler profiler, int maxMipmapLevel) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidIndicate to vanilla that it should load and bake the given model, even if no blocks or items use it.static Function<ResourceLocation,IUnbakedModel> static Function<RenderMaterial,TextureAtlasSprite> Get the default texture getter the models will be baked with.static ModelResourceLocationHooked from ModelBakery, allows using MRLs that don't end with "inventory" for items.protected IUnbakedModelprotected ResourceLocationgetModelLocation(ResourceLocation model) getModelOrLogError(ResourceLocation location, String error) Use this if you want the model, but need to log the error.getModelOrMissing(ResourceLocation location) Use this if you don't care about the exception and want some model anyway.static ModelLoaderinstance()booleanvoidonPostBakeEvent(Map<ResourceLocation, IBakedModel> modelRegistry) Internal, do not use.Methods inherited from class net.minecraft.client.renderer.model.ModelBakerybake, getBakedModel, getBakedTopLevelModels, getModel, getModelGroups, getSpriteMap, loadBlockModel, processLoading, uploadTextures
- 
Field Details- 
LOGGERprivate static final org.apache.logging.log4j.Logger LOGGER
- 
loadingExceptions
- 
missingModel
- 
isLoadingprivate boolean isLoading
- 
instance
- 
specialModels
- 
DEFAULT_MODEL_GETTERHelper method for registering all itemstacks for given item to map to universal bucket model.
 
- 
- 
Constructor Details- 
ModelLoaderpublic ModelLoader(IResourceManager manager, BlockColors colours, IProfiler profiler, int maxMipmapLevel) 
 
- 
- 
Method Details- 
instance
- 
isLoadingpublic boolean isLoading()
- 
addSpecialModelIndicate to vanilla that it should load and bake the given model, even if no blocks or items use it. This is useful if e.g. you have baked models only for entity renderers. Call duringModelRegistryEvent- Parameters:
- rl- The model, either- ModelResourceLocationto point to a blockstate variant, or plain- ResourceLocationto point directly to a json in the models folder.
 
- 
getSpecialModels- Overrides:
- getSpecialModelsin class- ModelBakery
 
- 
getInventoryVariantHooked from ModelBakery, allows using MRLs that don't end with "inventory" for items.
- 
getModelLocation
- 
getMissingModel
- 
getModelOrMissingUse this if you don't care about the exception and want some model anyway.
- 
getModelOrLogErrorUse this if you want the model, but need to log the error.
- 
onPostBakeEventInternal, do not use.
- 
defaultTextureGetterGet the default texture getter the models will be baked with.
- 
defaultModelGetter
 
-