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
Modifier and TypeFieldDescriptionstatic final StandaloneModelConfiguration
static final ResourceLocation
private final Map<String,
ResourceLocation> -
Constructor Summary
ConstructorDescriptionStandaloneModelConfiguration
(ResourceLocation modelName, Map<String, ResourceLocation> textures) -
Method Summary
Modifier and TypeMethodDescriptionstatic StandaloneModelConfiguration
create
(Map<String, ResourceLocation> textures) static StandaloneModelConfiguration
create
(ResourceLocation modelName) static StandaloneModelConfiguration
create
(ResourceLocation modelName, Map<String, ResourceLocation> textures) Gets the vanilla camera transforms data.If available, gets the owning model (usually BlockModel) of this configurationboolean
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:IModelConfiguration
If available, gets the owning model (usually BlockModel) of this configuration- Specified by:
getOwnerModel
in interfaceIModelConfiguration
-
getModelName
- Specified by:
getModelName
in interfaceIModelConfiguration
- Returns:
- The name of the model being baked, for logging and cache purposes.
-
isTexturePresent
Description copied from interface:IModelConfiguration
Checks if a texture is present in the model.- Specified by:
isTexturePresent
in interfaceIModelConfiguration
- Parameters:
name
- The name of a texture channel.
-
resolveTexture
Description copied from interface:IModelConfiguration
Resolves the final texture name, taking into account texture aliases and replacements.- Specified by:
resolveTexture
in 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:
isShadedInGui
in 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:
isSideLit
in interfaceIModelConfiguration
- Returns:
- True if the item is lit from the side
-
useSmoothLighting
public boolean useSmoothLighting()- Specified by:
useSmoothLighting
in interfaceIModelConfiguration
- Returns:
- True if the item requires per-vertex lighting.
-
getCameraTransforms
Description copied from interface:IModelConfiguration
Gets the vanilla camera transforms data. Do not use for non-vanilla code. For general usage, prefer getCombinedState.- Specified by:
getCameraTransforms
in interfaceIModelConfiguration
-
getCombinedTransform
- Specified by:
getCombinedTransform
in interfaceIModelConfiguration
- Returns:
- The combined transformation state including vanilla and forge transforms data.
-