Interface MaterialFinder
RenderMaterial
instances used to communicate
quad rendering characteristics to a RenderContext
.
Must be obtained via Renderer.materialFinder()
.
-
Method Summary
Modifier and TypeMethodDescriptionDefines how sprite pixels will be blended with the scene.default MaterialFinder
blendMode
(int spriteIndex, net.minecraft.client.render.RenderLayer renderLayer) Deprecated.clear()
Resets this instance to default values.disableAo
(int spriteIndex, boolean disable) Vertex color(s) will be modified for ambient occlusion unless disabled.disableColorIndex
(int spriteIndex, boolean disable) Vertex color(s) will be modified for quad color index unless disabled.disableDiffuse
(int spriteIndex, boolean disable) Vertex color(s) will be modified for diffuse shading unless disabled.emissive
(int spriteIndex, boolean isEmissive) When true, sprite texture and color will be rendered at full brightness.find()
Returns the standard material encoding all of the current settings in this finder.spriteDepth
(int depth) Reserved for future use.
-
Method Details
-
find
RenderMaterial 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. -
clear
MaterialFinder clear()Resets this instance to default values. Values will match those in effect when an instance is newly obtained viaRenderer.materialFinder()
. -
spriteDepth
Reserved for future use. Behavior for values > 1 is currently undefined. -
blendMode
@Deprecated default MaterialFinder blendMode(int spriteIndex, net.minecraft.client.render.RenderLayer renderLayer) Deprecated.UseBlendMode
version instead.Defines how sprite pixels will be blended with the scene. Accepts {link @BlockRenderLayer} values and blending behavior will emulate the way that Minecraft renders those instances. This does NOT mean the sprite will be rendered in a specific render pass - some implementations may not use the standard vanilla render passes.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) -
blendMode
Defines how sprite pixels will be blended with the scene.See
BlendMode
for more information. -
disableColorIndex
Vertex color(s) will be modified for quad color index unless disabled. -
disableDiffuse
Vertex color(s) will be modified for diffuse shading unless disabled. -
disableAo
Vertex color(s) will be modified for ambient occlusion unless disabled. -
emissive
When true, sprite texture and color will be rendered at full brightness. Lightmap values provided viaQuadView.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)
anddisableDiffuse(int, boolean)
.
-
BlendMode
version instead.