Package net.minecraftforge.client.model
Interface IModelConfiguration
- All Known Implementing Classes:
BlockModelConfiguration
public interface IModelConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionGets the vanilla camera transforms data.If available, gets the owning model (usually BlockModel) of this configurationdefault boolean
Queries the visibility information for the model parts.default boolean
getPartVisibility
(IModelGeometryPart part, boolean fallback) Queries the visibility information for the model parts.boolean
boolean
boolean
isTexturePresent
(String name) Checks if a texture is present in the model.resolveTexture
(String name) Resolves the final texture name, taking into account texture aliases and replacements.boolean
-
Method Details
-
getOwnerModel
If available, gets the owning model (usually BlockModel) of this configuration -
getModelName
String getModelName()- Returns:
- The name of the model being baked, for logging and cache purposes.
-
isTexturePresent
Checks if a texture is present in the model.- Parameters:
name
- The name of a texture channel.
-
resolveTexture
Resolves the final texture name, taking into account texture aliases and replacements.- Parameters:
name
- The name of a texture channel.- Returns:
- The location of the texture, or the missing texture if not found.
-
isShadedInGui
boolean isShadedInGui()- Returns:
- True if the item is a 3D model, false if it's a generated item model. TODO: Rename. This value has nothing to do with shading anymore, and this name is misleading. It's actual purpose seems to be relegated to translating the model during rendering, so that it's centered.
-
isSideLit
boolean isSideLit()- Returns:
- True if the item is lit from the side
-
useSmoothLighting
boolean useSmoothLighting()- Returns:
- True if the item requires per-vertex lighting.
-
getCameraTransforms
ItemCameraTransforms getCameraTransforms()Gets the vanilla camera transforms data. Do not use for non-vanilla code. For general usage, prefer getCombinedState. -
getCombinedTransform
IModelTransform getCombinedTransform()- Returns:
- The combined transformation state including vanilla and forge transforms data.
-
getPartVisibility
Queries the visibility information for the model parts.- Parameters:
part
- A part for which to query visibility.fallback
- A boolean specifying the default visibility if an override isn't found in the model data.- Returns:
- The final computed visibility.
-
getPartVisibility
Queries the visibility information for the model parts. Same as above, but defaulting to visible.- Parameters:
part
- A part for which to query visibility.- Returns:
- The final computed visibility.
-