Interface MaterialInstance


public interface MaterialInstance
This class is used to store data for a material instance.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A builder for MaterialInstance
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Gets if the block's tint is masked by its texture's alpha.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 2.11.3: use ambientOcclusionExponent() instead
    float
    Gets the exponent applied to the ambient occlusion value after lighting.
    Creates a builder for MaterialInstance.
    boolean
    Gets if the block should be dimmed on certain faces.
    boolean
    Gets if the block is isotropic, meaning the UVs of its faces are randomly rotated based on the block's position.
    @Nullable String
    Gets the render method of the block.
    @Nullable String
    Gets the texture of the block.
    boolean
    Gets if the block's texture can use texture variations.
    @Nullable String
    Gets the tint method of the block.
  • Method Details

    • texture

      @Nullable String texture()
      Gets the texture of the block.
      Returns:
      the texture of the block
      Since:
      2.2.0
    • renderMethod

      @Nullable String renderMethod()
      Gets the render method of the block.
      Returns:
      the render method of the block
      Since:
      2.2.0
    • tintMethod

      @Nullable String tintMethod()
      Gets the tint method of the block.
      Returns:
      the tint method of the block
      Since:
      2.9.1
    • faceDimming

      boolean faceDimming()
      Gets if the block should be dimmed on certain faces.
      Returns:
      if the block should be dimmed on certain faces
      Since:
      2.2.0
    • ambientOcclusion

      @Deprecated(since="2.11.3", forRemoval=true) boolean ambientOcclusion()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 2.11.3: use ambientOcclusionExponent() instead
      Gets if the block should have ambient occlusion.

      This method is deprecated for removal and will be removed in Geyser 2.13.0.

      Returns:
      if the block should have ambient occlusion
      Since:
      2.2.0
    • ambientOcclusionExponent

      float ambientOcclusionExponent()
      Gets the exponent applied to the ambient occlusion value after lighting. Bedrock accepts values between 0.0 and 10.0, where 0.0 disables ambient occlusion and 1.0 is the default strength.
      Returns:
      the ambient occlusion exponent
      Since:
      2.11.3
    • isotropic

      boolean isotropic()
      Gets if the block is isotropic, meaning the UVs of its faces are randomly rotated based on the block's position.
      Returns:
      if the block is isotropic
      Since:
      2.9.1
    • textureVariation

      boolean textureVariation()
      Gets if the block's texture can use texture variations.
      Returns:
      if the block's texture can use texture variations
      Since:
      2.12.2
    • alphaMaskedTint

      boolean alphaMaskedTint()
      Gets if the block's tint is masked by its texture's alpha.
      Returns:
      if the block's tint is masked by its texture's alpha
      Since:
      2.12.2
    • builder

      static MaterialInstance.Builder builder()
      Creates a builder for MaterialInstance.
      Returns:
      a builder for MaterialInstance