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, wait
getPartVisibility
public final BlockModel owner
public final BlockModelConfiguration.VisibilityData visibilityData
@Nullable private IModelGeometry<?> customGeometry
@Nullable private IModelTransform customModelState
public BlockModelConfiguration(BlockModel owner)
@Nullable public IUnbakedModel getOwnerModel()
IModelConfiguration
getOwnerModel
in interface IModelConfiguration
public java.lang.String getModelName()
getModelName
in interface IModelConfiguration
public 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)
IModelConfiguration
getPartVisibility
in interface IModelConfiguration
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.public boolean isTexturePresent(java.lang.String name)
IModelConfiguration
isTexturePresent
in interface IModelConfiguration
name
- The name of a texture channel.public Material resolveTexture(java.lang.String name)
IModelConfiguration
resolveTexture
in interface IModelConfiguration
name
- The name of a texture channel.public boolean isShadedInGui()
isShadedInGui
in interface IModelConfiguration
public boolean isSideLit()
isSideLit
in interface IModelConfiguration
public boolean useSmoothLighting()
useSmoothLighting
in interface IModelConfiguration
public ItemCameraTransforms getCameraTransforms()
IModelConfiguration
getCameraTransforms
in interface IModelConfiguration
public IModelTransform getCombinedTransform()
getCombinedTransform
in interface IModelConfiguration
public 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)