Adjust light matrix calculations to use per-face logic (#4339)

This commit is contained in:
Ben Staddon 2017-12-17 02:30:18 +00:00 committed by LexManos
parent dc6fa09066
commit 37e5dc1e66
1 changed files with 2 additions and 7 deletions

View File

@ -105,7 +105,6 @@ public class BlockInfo
public void updateLightMatrix()
{
boolean full = false;
for(int x = 0; x <= 2; x++)
{
for(int y = 0; y <= 2; y++)
@ -120,16 +119,12 @@ public class BlockInfo
s[x][y][z] = (brightness >> 0x14) & 0xF;
b[x][y][z] = (brightness >> 0x04) & 0xF;
ao[x][y][z] = state.getAmbientOcclusionLightValue();
if(x == 1 && y == 1 && z == 1)
{
full = state.isFullCube();
}
}
}
}
if(!full)
for(EnumFacing side : SIDES)
{
for(EnumFacing side : SIDES)
if(!state.getBlock().doesSideBlockRendering(state, world, blockPos, side))
{
int x = side.getFrontOffsetX() + 1;
int y = side.getFrontOffsetY() + 1;