Interface MaterialInstance.Builder

Enclosing interface:
MaterialInstance

public static interface MaterialInstance.Builder
A builder for MaterialInstance
Since:
2.2.0
  • Method Details

    • texture

      MaterialInstance.Builder texture(@Nullable String texture)
      Sets the texture of the block.
      Parameters:
      texture - the texture of the block
      Returns:
      this builder
      Since:
      2.2.0
      See Also:
    • renderMethod

      MaterialInstance.Builder renderMethod(@Nullable String 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

      MaterialInstance.Builder tintMethod(@Nullable String 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

      MaterialInstance.Builder faceDimming(boolean 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: Use ambientOcclusionExponent(float) instead
      Sets 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

      MaterialInstance.Builder ambientOcclusionExponent(float ambientOcclusionExponent)
      Sets the exponent applied to the ambient occlusion value after lighting, between 0.0 and 10.0 inclusive.
      Parameters:
      ambientOcclusionExponent - the ambient occlusion exponent
      Returns:
      this builder
      Since:
      2.11.3
      See Also:
    • isotropic

      MaterialInstance.Builder isotropic(boolean 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

      MaterialInstance.Builder textureVariation(boolean 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

      MaterialInstance.Builder alphaMaskedTint(boolean 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

      Creates the MaterialInstance.
      Returns:
      the MaterialInstance
      Since:
      2.2.0