Adjust light matrix calculations to use per-face logic (#4339)
This commit is contained in:
parent
dc6fa09066
commit
37e5dc1e66
|
@ -105,7 +105,6 @@ public class BlockInfo
|
||||||
|
|
||||||
public void updateLightMatrix()
|
public void updateLightMatrix()
|
||||||
{
|
{
|
||||||
boolean full = false;
|
|
||||||
for(int x = 0; x <= 2; x++)
|
for(int x = 0; x <= 2; x++)
|
||||||
{
|
{
|
||||||
for(int y = 0; y <= 2; y++)
|
for(int y = 0; y <= 2; y++)
|
||||||
|
@ -120,16 +119,12 @@ public class BlockInfo
|
||||||
s[x][y][z] = (brightness >> 0x14) & 0xF;
|
s[x][y][z] = (brightness >> 0x14) & 0xF;
|
||||||
b[x][y][z] = (brightness >> 0x04) & 0xF;
|
b[x][y][z] = (brightness >> 0x04) & 0xF;
|
||||||
ao[x][y][z] = state.getAmbientOcclusionLightValue();
|
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 x = side.getFrontOffsetX() + 1;
|
||||||
int y = side.getFrontOffsetY() + 1;
|
int y = side.getFrontOffsetY() + 1;
|
||||||
|
|
Loading…
Reference in New Issue