Interface MaterialFinder

All Superinterfaces:
MaterialView

public interface MaterialFinder extends MaterialView
Finds standard RenderMaterial instances used to communicate quad rendering characteristics to a RenderContext.

Must be obtained via Renderer.materialFinder().

  • Method Details

    • blendMode

      default MaterialFinder blendMode(BlendMode blendMode)
      Defines how sprite pixels will be blended with the scene.

      See BlendMode for more information.

      API Note:
      The default implementation will be removed in the next breaking release.
    • disableColorIndex

      default MaterialFinder disableColorIndex(boolean disable)
      Vertex color(s) will be modified for quad color index unless disabled.
      API Note:
      The default implementation will be removed in the next breaking release.
    • emissive

      default MaterialFinder emissive(boolean isEmissive)
      When true, sprite texture and color will be rendered at full brightness. Lightmap values provided via QuadView.lightmap(int) will be ignored. False by default

      This is the preferred method for emissive lighting effects. Some renderers with advanced lighting models may not use block lightmaps and this method will allow per-sprite emissive lighting in future extensions that support overlay sprites.

      Note that color will still be modified by diffuse shading and ambient occlusion, unless disabled via disableDiffuse(boolean) and ambientOcclusion(TriState).

      API Note:
      The default implementation will be removed in the next breaking release.
    • disableDiffuse

      default MaterialFinder disableDiffuse(boolean disable)
      Vertex color(s) will be modified for diffuse shading unless disabled.

      This property is guaranteed to be respected in block contexts. Some renderers may also respect it in item contexts, but this is not guaranteed.

      API Note:
      The default implementation will be removed in the next breaking release.
    • ambientOcclusion

      default MaterialFinder ambientOcclusion(TriState mode)
      Controls whether vertex color(s) will be modified for ambient occlusion.

      By default, ambient occlusion will be used if the model uses ambient occlusion and the block state has a luminance of 0. Set to TriState.TRUE or TriState.FALSE to override this behavior.

      This property is respected only in block contexts. It will not have an effect in other contexts.

      API Note:
      The default implementation will be removed in the next breaking release.
    • glint

      default MaterialFinder glint(TriState mode)
      Controls whether glint should be applied.

      By default, glint will be applied in item contexts if the item stack has glint. Set to TriState.TRUE or TriState.FALSE to override this behavior.

      This property is guaranteed to be respected in item contexts. Some renderers may also respect it in block contexts, but this is not guaranteed.

      API Note:
      The default implementation will be removed in the next breaking release.
    • copyFrom

      default MaterialFinder copyFrom(MaterialView material)
      Copies all properties from the given MaterialView to this material finder.
      API Note:
      The default implementation will be removed in the next breaking release.
    • clear

      Resets this instance to default values. Values will match those in effect when an instance is newly obtained via Renderer.materialFinder().
    • find

      Returns the standard material encoding all of the current settings in this finder. The settings in this finder are not changed.

      Resulting instances can and should be re-used to prevent needless memory allocation. Renderer implementations may or may not cache standard material instances.

    • blendMode

      @Deprecated default MaterialFinder blendMode(int spriteIndex, RenderLayer renderLayer)
      Deprecated.
    • blendMode

      @Deprecated default MaterialFinder blendMode(int spriteIndex, BlendMode blendMode)
      Deprecated.
    • disableColorIndex

      @Deprecated default MaterialFinder disableColorIndex(int spriteIndex, boolean disable)
      Deprecated.
    • emissive

      @Deprecated default MaterialFinder emissive(int spriteIndex, boolean isEmissive)
      Deprecated.
      Use emissive(boolean) instead.
    • disableDiffuse

      @Deprecated default MaterialFinder disableDiffuse(int spriteIndex, boolean disable)
      Deprecated.
    • disableAo

      @Deprecated default MaterialFinder disableAo(int spriteIndex, boolean disable)
      Deprecated.
    • spriteDepth

      @Deprecated default MaterialFinder spriteDepth(int depth)
      Deprecated.
      Do not use. Does nothing.