Package net.minecraftforge.client.model
Class ForgeModelBakery
java.lang.Object
net.minecraft.client.resources.model.ModelBakery
net.minecraftforge.client.model.ForgeModelBakery
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
16x16 pure white sprite.static final class
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Function<ResourceLocation,
UnbakedModel> Helper method for registering all itemstacks for given item to map to universal bucket model.private static ForgeModelBakery
private boolean
private final Map<ResourceLocation,
Exception> private static final org.apache.logging.log4j.Logger
private UnbakedModel
private static Set<ResourceLocation>
Fields inherited from class net.minecraft.client.resources.model.ModelBakery
BANNER_BASE, BLOCK_ENTITY_MARKER, BREAKING_LOCATIONS, DESTROY_STAGE_COUNT, 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 Summary
ConstructorDescriptionForgeModelBakery
(ResourceManager manager, BlockColors colours, ProfilerFiller profiler, int maxMipmapLevel) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Indicate to vanilla that it should load and bake the given model, even if no blocks or items use it.static Function<ResourceLocation,
UnbakedModel> static Function<Material,
TextureAtlasSprite> Get the default texture getter the models will be baked with.static ModelResourceLocation
Hooked from ModelBakery, allows using MRLs that don't end with "inventory" for items.protected UnbakedModel
protected ResourceLocation
getModelLocation
(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 ForgeModelBakery
instance()
boolean
void
onPostBakeEvent
(Map<ResourceLocation, BakedModel> modelRegistry) Internal, do not use.Methods inherited from class net.minecraft.client.resources.model.ModelBakery
bake, bake, getBakedTopLevelModels, getModel, getModelGroups, getSpriteMap, loadBlockModel, processLoading, uploadTextures
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
loadingExceptions
-
missingModel
-
isLoading
private boolean isLoading -
instance
-
specialModels
-
DEFAULT_MODEL_GETTER
Helper method for registering all itemstacks for given item to map to universal bucket model.
-
-
Constructor Details
-
ForgeModelBakery
public ForgeModelBakery(ResourceManager manager, BlockColors colours, ProfilerFiller profiler, int maxMipmapLevel)
-
-
Method Details
-
instance
-
isLoading
public boolean isLoading() -
addSpecialModel
Indicate 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, eitherModelResourceLocation
to point to a blockstate variant, or plainResourceLocation
to point directly to a json in the models folder.
-
getSpecialModels
- Overrides:
getSpecialModels
in classModelBakery
-
getInventoryVariant
Hooked from ModelBakery, allows using MRLs that don't end with "inventory" for items. -
getModelLocation
-
getMissingModel
-
getModelOrMissing
Use this if you don't care about the exception and want some model anyway. -
getModelOrLogError
Use this if you want the model, but need to log the error. -
onPostBakeEvent
Internal, do not use. -
defaultTextureGetter
Get the default texture getter the models will be baked with. -
defaultModelGetter
-