Class BlockGeometryBakingContext
java.lang.Object
net.minecraftforge.client.model.geometry.BlockGeometryBakingContext
- All Implemented Interfaces:
- IGeometryBakingContext
A geometry baking context that is bound to a 
BlockModel.
 Users should not be instantiating this themselves.
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate @Nullable IUnbakedGeometry<?>private booleanfinal BlockModelprivate @Nullable ResourceLocationprivate @Nullable Transformation
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbake(ModelBaker baker, Function<Material, TextureAtlasSprite> bakedTextureGetter, ModelState modelTransform, ItemOverrides overrides, ResourceLocation modelLocation) void@Nullable IUnbakedGeometry<?>getMaterial(String name) Resolves the final texture name, taking into account texture aliases and replacements.Returns the name of the model being baked for logging and caching purposes..@Nullable ResourceLocationReturns a hint of the render type this model should use. Custom loaders may ignore this..Returns the root transformation to be applied to all variants of this model, regardless of item transforms..Returns the transforms for display in item form..booleanbooleanhasMaterial(String name) Checks if a material is present in the model.booleanisComponentVisible(String part, boolean fallback) Queries the visibility of a component of this model.booleanisGui3d()Returns true if this model should render in 3D in a GUI, false otherwise.voidsetCustomGeometry(IUnbakedGeometry<?> geometry) voidsetGui3d(boolean gui3d) voidsetRenderTypeHint(ResourceLocation renderTypeHint) voidsetRootTransform(Transformation rootTransform) booleanReturns true if per-vertex ambient occlusion should be used for this model, false otherwise.booleanReturns true if block lighting should be used for this model, false otherwise.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.client.model.geometry.IGeometryBakingContextgetRenderType
- 
Field Details- 
owner
- 
visibilityData
- 
customGeometry
- 
rootTransform
- 
renderTypeHint
- 
gui3dprivate boolean gui3d
 
- 
- 
Constructor Details- 
BlockGeometryBakingContext
 
- 
- 
Method Details- 
getModelNameDescription copied from interface:IGeometryBakingContextReturns the name of the model being baked for logging and caching purposes..- Specified by:
- getModelNamein interface- IGeometryBakingContext
- Returns:
- the name of the model being baked for logging and caching purposes.
 
- 
hasCustomGeometrypublic boolean hasCustomGeometry()
- 
getCustomGeometry
- 
setCustomGeometry
- 
isComponentVisibleDescription copied from interface:IGeometryBakingContextQueries the visibility of a component of this model.- Specified by:
- isComponentVisiblein interface- IGeometryBakingContext
- Parameters:
- part- The component for which to query visibility
- fallback- The default visibility if an override isn't found
- Returns:
- The visibility of the component
 
- 
hasMaterialDescription copied from interface:IGeometryBakingContextChecks if a material is present in the model.- Specified by:
- hasMaterialin interface- IGeometryBakingContext
- Parameters:
- name- The name of the material
- Returns:
- true if the material is present, false otherwise
 
- 
getMaterialDescription copied from interface:IGeometryBakingContextResolves the final texture name, taking into account texture aliases and replacements.- Specified by:
- getMaterialin interface- IGeometryBakingContext
- Parameters:
- name- The name of the material
- Returns:
- The material, or the missing texture if not found
 
- 
isGui3dpublic boolean isGui3d()Description copied from interface:IGeometryBakingContextReturns true if this model should render in 3D in a GUI, false otherwise.- Specified by:
- isGui3din interface- IGeometryBakingContext
- Returns:
- true if this model should render in 3D in a GUI, false otherwise
 
- 
useBlockLightpublic boolean useBlockLight()Description copied from interface:IGeometryBakingContextReturns true if block lighting should be used for this model, false otherwise.- Specified by:
- useBlockLightin interface- IGeometryBakingContext
- Returns:
- true if block lighting should be used for this model, false otherwise
 
- 
useAmbientOcclusionpublic boolean useAmbientOcclusion()Description copied from interface:IGeometryBakingContextReturns true if per-vertex ambient occlusion should be used for this model, false otherwise.- Specified by:
- useAmbientOcclusionin interface- IGeometryBakingContext
- Returns:
- true if per-vertex ambient occlusion should be used for this model, false otherwise
 
- 
getTransformsDescription copied from interface:IGeometryBakingContextReturns the transforms for display in item form..- Specified by:
- getTransformsin interface- IGeometryBakingContext
- Returns:
- the transforms for display in item form.
 
- 
getRootTransformDescription copied from interface:IGeometryBakingContextReturns the root transformation to be applied to all variants of this model, regardless of item transforms..- Specified by:
- getRootTransformin interface- IGeometryBakingContext
- Returns:
- the root transformation to be applied to all variants of this model, regardless of item transforms.
 
- 
setRootTransform
- 
getRenderTypeHintDescription copied from interface:IGeometryBakingContextReturns a hint of the render type this model should use. Custom loaders may ignore this..- Specified by:
- getRenderTypeHintin interface- IGeometryBakingContext
- Returns:
- a hint of the render type this model should use. Custom loaders may ignore this.
 
- 
setRenderTypeHint
- 
setGui3dpublic void setGui3d(boolean gui3d) 
- 
copyFrom
- 
bakepublic BakedModel bake(ModelBaker baker, Function<Material, TextureAtlasSprite> bakedTextureGetter, ModelState modelTransform, ItemOverrides overrides, ResourceLocation modelLocation) 
 
-