public interface MaterialFinder
RenderMaterial
instances used to communicate
quad rendering characteristics to a RenderContext
.
Must be obtained via Renderer.materialFinder()
.
Modifier and Type | Method and Description |
---|---|
MaterialFinder |
blendMode(int spriteIndex,
net.minecraft.block.BlockRenderLayer blendMode)
Defines how sprite pixels will be blended with the scene.
|
MaterialFinder |
clear()
Resets this instance to default values.
|
MaterialFinder |
disableAo(int spriteIndex,
boolean disable)
Vertex color(s) will be modified for ambient occlusion unless disabled.
|
MaterialFinder |
disableColorIndex(int spriteIndex,
boolean disable)
Vertex color(s) will be modified for quad color index unless disabled.
|
MaterialFinder |
disableDiffuse(int spriteIndex,
boolean disable)
Vertex color(s) will be modified for diffuse shading unless disabled.
|
MaterialFinder |
emissive(int spriteIndex,
boolean isEmissive)
When true, sprite texture and color will be rendered at full brightness.
|
RenderMaterial |
find()
Returns the standard material encoding all
of the current settings in this finder.
|
MaterialFinder |
spriteDepth(int depth)
Reserved for future use.
|
RenderMaterial find()
Resulting instances can and should be re-used to prevent
needless memory allocation. Renderer
implementations
may or may not cache standard material instances.
MaterialFinder clear()
Renderer.materialFinder()
.MaterialFinder spriteDepth(int depth)
MaterialFinder blendMode(int spriteIndex, net.minecraft.block.BlockRenderLayer blendMode)
CAN be null and is null by default. A null value means the renderer
will use Block.getRenderLayer()
for the associate block, or
BlockRenderLayer.TRANSLUCENT
for item renders. (Normal Minecraft rendering)
MaterialFinder disableColorIndex(int spriteIndex, boolean disable)
MaterialFinder disableDiffuse(int spriteIndex, boolean disable)
MaterialFinder disableAo(int spriteIndex, boolean disable)
MaterialFinder emissive(int spriteIndex, boolean isEmissive)
QuadView.lightmap(int)
will be ignored.
False by defaultThis 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 disableAo(int, boolean)
and disableDiffuse(int, boolean)
.