Fabric API

Fabric API

106M Downloads

Indigo MaterialFinder does not honor null values for blend mode

grondag opened this issue ยท 1 comments

commented

The API spec reads:

    /**
     * Defines how sprite pixels will be blended with the scene.
     * Accepts {link @BlockRenderLayer} values and blending behavior
     * will emulate the way that Minecraft renders each pass. But this does 
     * NOT mean the sprite will be rendered in a specific render pass - some
     * implementations may not use the standard Minecraft render passes.<p>
     * 
     * CAN be null and is null by default. A null value means the renderer
     * will use {@link Block#getRenderLayer()} for the associate block, or
     * {@link BlockRenderLayer#TRANSLUCENT} for item renders. (Normal Minecraft rendering)
     */
    MaterialFinder blendMode(int spriteIndex, BlockRenderLayer blendMode);

However, the default is SOLID and null values throw NPE.

This flaw doesn't matter for vanilla models because Indigo assumes the Block value should apply, but prevents custom materials/model from exploiting this behavior when desirable.

Will have a PR shortly.

commented

Closed with #213