public class BlockModelConfiguration extends java.lang.Object implements IModelConfiguration
| Modifier and Type | Class and Description |
|---|---|
static class |
BlockModelConfiguration.VisibilityData |
| Modifier and Type | Field and Description |
|---|---|
private IModelGeometry<?> |
customGeometry |
private IModelTransform |
customModelState |
BlockModel |
owner |
BlockModelConfiguration.VisibilityData |
visibilityData |
| Constructor and Description |
|---|
BlockModelConfiguration(BlockModel owner) |
| Modifier and Type | Method and Description |
|---|---|
IBakedModel |
bake(ModelBakery bakery,
java.util.function.Function<Material,TextureAtlasSprite> bakedTextureGetter,
IModelTransform modelTransform,
ItemOverrideList overrides,
ResourceLocation modelLocation) |
void |
copyFrom(BlockModelConfiguration other) |
ItemCameraTransforms |
getCameraTransforms()
Gets the vanilla camera transforms data.
|
IModelTransform |
getCombinedTransform() |
IModelGeometry<?> |
getCustomGeometry() |
IModelTransform |
getCustomModelState() |
java.lang.String |
getModelName() |
IUnbakedModel |
getOwnerModel()
If available, gets the owning model (usually BlockModel) of this configuration
|
boolean |
getPartVisibility(IModelGeometryPart part,
boolean fallback)
Queries the visibility information for the model parts.
|
java.util.Collection<Material> |
getTextureDependencies(java.util.function.Function<ResourceLocation,IUnbakedModel> modelGetter,
java.util.Set<com.mojang.datafixers.util.Pair<java.lang.String,java.lang.String>> missingTextureErrors) |
boolean |
hasCustomGeometry() |
boolean |
isShadedInGui() |
boolean |
isSideLit() |
boolean |
isTexturePresent(java.lang.String name)
Checks if a texture is present in the model.
|
Material |
resolveTexture(java.lang.String name)
Resolves the final texture name, taking into account texture aliases and replacements.
|
void |
setCustomGeometry(IModelGeometry<?> geometry) |
void |
setCustomModelState(IModelTransform modelState) |
boolean |
useSmoothLighting() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPartVisibilitypublic final BlockModel owner
public final BlockModelConfiguration.VisibilityData visibilityData
@Nullable private IModelGeometry<?> customGeometry
@Nullable private IModelTransform customModelState
public BlockModelConfiguration(BlockModel owner)
@Nullable public IUnbakedModel getOwnerModel()
IModelConfigurationgetOwnerModel in interface IModelConfigurationpublic java.lang.String getModelName()
getModelName in interface IModelConfigurationpublic boolean hasCustomGeometry()
@Nullable public IModelGeometry<?> getCustomGeometry()
public void setCustomGeometry(IModelGeometry<?> geometry)
@Nullable public IModelTransform getCustomModelState()
public void setCustomModelState(IModelTransform modelState)
public boolean getPartVisibility(IModelGeometryPart part, boolean fallback)
IModelConfigurationgetPartVisibility in interface IModelConfigurationpart - A part for which to query visibility.fallback - A boolean specifying the default visibility if an override isn't found in the model data.public boolean isTexturePresent(java.lang.String name)
IModelConfigurationisTexturePresent in interface IModelConfigurationname - The name of a texture channel.public Material resolveTexture(java.lang.String name)
IModelConfigurationresolveTexture in interface IModelConfigurationname - The name of a texture channel.public boolean isShadedInGui()
isShadedInGui in interface IModelConfigurationpublic boolean isSideLit()
isSideLit in interface IModelConfigurationpublic boolean useSmoothLighting()
useSmoothLighting in interface IModelConfigurationpublic ItemCameraTransforms getCameraTransforms()
IModelConfigurationgetCameraTransforms in interface IModelConfigurationpublic IModelTransform getCombinedTransform()
getCombinedTransform in interface IModelConfigurationpublic void copyFrom(BlockModelConfiguration other)
public java.util.Collection<Material> getTextureDependencies(java.util.function.Function<ResourceLocation,IUnbakedModel> modelGetter, java.util.Set<com.mojang.datafixers.util.Pair<java.lang.String,java.lang.String>> missingTextureErrors)
public IBakedModel bake(ModelBakery bakery, java.util.function.Function<Material,TextureAtlasSprite> bakedTextureGetter, IModelTransform modelTransform, ItemOverrideList overrides, ResourceLocation modelLocation)