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,
BlendMode blendMode)
Defines how sprite pixels will be blended with the scene.
|
default MaterialFinder |
blendMode(int spriteIndex,
net.minecraft.client.render.RenderLayer renderLayer)
Deprecated.
Use
BlendMode version instead. |
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)
@Deprecated default MaterialFinder blendMode(int spriteIndex, net.minecraft.client.render.RenderLayer renderLayer)
BlendMode
version instead.CAN be null and is null by default. A null value means the renderer
will use the value normally associated with the block being rendered, or
TRANSLUCENT
for item renders. (Normal Minecraft rendering)
MaterialFinder blendMode(int spriteIndex, BlendMode blendMode)
See BlendMode
for more information.
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 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 disableAo(int, boolean)
and disableDiffuse(int, boolean)
.