Package net.minecraftforge.client.model
Class StandaloneModelConfiguration
java.lang.Object
net.minecraftforge.client.model.StandaloneModelConfiguration
- All Implemented Interfaces:
IModelConfiguration
Helper to allow baking models outwise the context of block/item model loading.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StandaloneModelConfigurationstatic final ResourceLocationprivate final Map<String,ResourceLocation> -
Constructor Summary
ConstructorsConstructorDescriptionStandaloneModelConfiguration(ResourceLocation modelName, Map<String, ResourceLocation> textures) -
Method Summary
Modifier and TypeMethodDescriptionstatic StandaloneModelConfigurationcreate(Map<String, ResourceLocation> textures) static StandaloneModelConfigurationcreate(ResourceLocation modelName) static StandaloneModelConfigurationcreate(ResourceLocation modelName, Map<String, ResourceLocation> textures) Gets the vanilla camera transforms data.If available, gets the owning model (usually BlockModel) of this configurationbooleanbooleanbooleanisTexturePresent(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.booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.client.model.IModelConfiguration
getPartVisibility, getPartVisibility
-
Field Details
-
LOCATION
-
INSTANCE
-
textures
-
-
Constructor Details
-
StandaloneModelConfiguration
public StandaloneModelConfiguration(ResourceLocation modelName, Map<String, ResourceLocation> textures)
-
-
Method Details
-
create
-
create
-
create
public static StandaloneModelConfiguration create(ResourceLocation modelName, Map<String, ResourceLocation> textures) -
getOwnerModel
Description copied from interface:IModelConfigurationIf available, gets the owning model (usually BlockModel) of this configuration- Specified by:
getOwnerModelin interfaceIModelConfiguration
-
getModelName
- Specified by:
getModelNamein interfaceIModelConfiguration- Returns:
- The name of the model being baked, for logging and cache purposes.
-
isTexturePresent
Description copied from interface:IModelConfigurationChecks if a texture is present in the model.- Specified by:
isTexturePresentin interfaceIModelConfiguration- Parameters:
name- The name of a texture channel.
-
resolveTexture
Description copied from interface:IModelConfigurationResolves the final texture name, taking into account texture aliases and replacements.- Specified by:
resolveTexturein interfaceIModelConfiguration- Parameters:
name- The name of a texture channel.- Returns:
- The location of the texture, or the missing texture if not found.
-
isShadedInGui
public boolean isShadedInGui()- Specified by:
isShadedInGuiin interfaceIModelConfiguration- 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
public boolean isSideLit()- Specified by:
isSideLitin interfaceIModelConfiguration- Returns:
- True if the item is lit from the side
-
useSmoothLighting
public boolean useSmoothLighting()- Specified by:
useSmoothLightingin interfaceIModelConfiguration- Returns:
- True if the item requires per-vertex lighting.
-
getCameraTransforms
Description copied from interface:IModelConfigurationGets the vanilla camera transforms data. Do not use for non-vanilla code. For general usage, prefer getCombinedState.- Specified by:
getCameraTransformsin interfaceIModelConfiguration
-
getCombinedTransform
- Specified by:
getCombinedTransformin interfaceIModelConfiguration- Returns:
- The combined transformation state including vanilla and forge transforms data.
-