This reverts back to the old way of extending the vertex format with the necessary vertex element for lightmap data, if fullbright quads are enabled. Instead of then enabling the extended vertex format for Optifine, it is disabled if Optifine is detected.
Since the root cause is actually that the Vanilla lighting pipeline doesn't support such Vertex Formats, we disable it also if the Forge lighting pipeline is disabled. This also relates to #2489.
This commit is contained in:
committed by
shartte
parent
0bbf898709
commit
59544993bd
@@ -64,7 +64,6 @@ import net.minecraft.client.renderer.block.model.ItemTransformVec3f;
|
||||
import net.minecraft.client.renderer.block.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.block.model.ModelBlock;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.resources.IResource;
|
||||
import net.minecraft.client.resources.IResourceManager;
|
||||
@@ -81,6 +80,8 @@ import net.minecraftforge.common.model.IModelState;
|
||||
import net.minecraftforge.common.model.ITransformation;
|
||||
import net.minecraftforge.fml.relauncher.ReflectionHelper;
|
||||
|
||||
import appeng.client.render.VertexFormats;
|
||||
|
||||
|
||||
public enum UVLModelLoader implements ICustomModelLoader
|
||||
{
|
||||
@@ -335,7 +336,8 @@ public enum UVLModelLoader implements ICustomModelLoader
|
||||
Pair<Float, Float> brightness = uvlightmap.get( face );
|
||||
if( brightness != null )
|
||||
{
|
||||
UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder( DefaultVertexFormats.BLOCK );
|
||||
VertexFormat newFormat = VertexFormats.getFormatWithLightMap( quad.getFormat() );
|
||||
UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder( newFormat );
|
||||
VertexLighterFlat trans = new VertexLighterFlat( Minecraft.getMinecraft().getBlockColors() ){
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user