Interface MaterialInstance.Builder
- Enclosing interface:
MaterialInstance
public static interface MaterialInstance.Builder
A builder for MaterialInstance
- Since:
- 2.2.0
-
Method Summary
Modifier and TypeMethodDescriptionalphaMaskedTint(boolean alphaMaskedTint) Sets if the block's tint is masked by its texture's alpha.ambientOcclusion(boolean ambientOcclusion) Deprecated, for removal: This API element is subject to removal in a future version.ambientOcclusionExponent(float ambientOcclusionExponent) Sets the exponent applied to the ambient occlusion value after lighting, between0.0and10.0inclusive.build()Creates the MaterialInstance.faceDimming(boolean faceDimming) Sets if the block should be dimmed on certain faces.isotropic(boolean isotropic) Sets if the block is isotropic, meaning the UVs of its faces are randomly rotated based on the block's position.renderMethod(@Nullable String renderMethod) Sets the render method of the block.Sets the texture of the block.textureVariation(boolean textureVariation) Sets if the block's texture can use texture variations.tintMethod(@Nullable String tintMethod) Sets the tint method of the block.
-
Method Details
-
texture
Sets the texture of the block.- Parameters:
texture- the texture of the block- Returns:
- this builder
- Since:
- 2.2.0
- See Also:
-
renderMethod
Sets the render method of the block.- Parameters:
renderMethod- the render method of the block- Returns:
- this builder
- Since:
- 2.2.0
- See Also:
-
tintMethod
Sets the tint method of the block.- Parameters:
tintMethod- the tint method of the block- Returns:
- this builder
- Since:
- 2.9.1
- See Also:
-
faceDimming
Sets if the block should be dimmed on certain faces.- Parameters:
faceDimming- if the block should be dimmed on certain faces- Returns:
- this builder
- Since:
- 2.2.0
- See Also:
-
ambientOcclusion
@Deprecated(since="2.11.3", forRemoval=true) MaterialInstance.Builder ambientOcclusion(boolean ambientOcclusion) Deprecated, for removal: This API element is subject to removal in a future version.since 2.11.3: UseambientOcclusionExponent(float)insteadSets if the block should have ambient occlusion.This method is deprecated for removal and will be removed in Geyser 2.13.0.
- Parameters:
ambientOcclusion- if the block should have ambient occlusion- Returns:
- this builder
- Since:
- 2.2.0
-
ambientOcclusionExponent
Sets the exponent applied to the ambient occlusion value after lighting, between0.0and10.0inclusive.- Parameters:
ambientOcclusionExponent- the ambient occlusion exponent- Returns:
- this builder
- Since:
- 2.11.3
- See Also:
-
isotropic
Sets if the block is isotropic, meaning the UVs of its faces are randomly rotated based on the block's position.- Parameters:
isotropic- if the block is isotropic- Returns:
- this builder
- Since:
- 2.9.1
- See Also:
-
textureVariation
Sets if the block's texture can use texture variations.- Parameters:
textureVariation- if the block's texture can use texture variations- Returns:
- this builder
- Since:
- 2.12.2
- See Also:
-
alphaMaskedTint
Sets if the block's tint is masked by its texture's alpha.- Parameters:
alphaMaskedTint- if the block's tint is masked by its texture's alpha- Returns:
- this builder
- Since:
- 2.12.2
- See Also:
-
build
MaterialInstance build()Creates the MaterialInstance.- Returns:
- the MaterialInstance
- Since:
- 2.2.0
-
ambientOcclusionExponent(float)instead