Trying to fix #2489: Always use the BLOCK VertexFormat for fullbright quads, and try to disable diffuse lighting for them.
This commit is contained in:
parent
d432a6eb89
commit
6cdcd8ccc9
|
@ -32,7 +32,6 @@ import java.lang.reflect.Type;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
|
@ -336,12 +335,7 @@ public enum UVLModelLoader implements ICustomModelLoader
|
||||||
Pair<Float, Float> brightness = uvlightmap.get( face );
|
Pair<Float, Float> brightness = uvlightmap.get( face );
|
||||||
if( brightness != null )
|
if( brightness != null )
|
||||||
{
|
{
|
||||||
VertexFormat format = new VertexFormat( quad.getFormat() );
|
UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder( DefaultVertexFormats.BLOCK );
|
||||||
if( !format.getElements().contains( DefaultVertexFormats.TEX_2S ) )
|
|
||||||
{
|
|
||||||
format.addElement( DefaultVertexFormats.TEX_2S );
|
|
||||||
}
|
|
||||||
UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder( format );
|
|
||||||
VertexLighterFlat trans = new VertexLighterFlat( Minecraft.getMinecraft().getBlockColors() ){
|
VertexLighterFlat trans = new VertexLighterFlat( Minecraft.getMinecraft().getBlockColors() ){
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -362,6 +356,7 @@ public enum UVLModelLoader implements ICustomModelLoader
|
||||||
builder.setQuadTint( quad.getTintIndex() );
|
builder.setQuadTint( quad.getTintIndex() );
|
||||||
builder.setQuadOrientation( quad.getFace() );
|
builder.setQuadOrientation( quad.getFace() );
|
||||||
builder.setTexture( quad.getSprite() );
|
builder.setTexture( quad.getSprite() );
|
||||||
|
builder.setApplyDiffuseLighting( false );
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue