Fix forge light pipeline applying block offsets twice (#7323)

This commit is contained in:
Take Weiland authored and GitHub committed 2020-09-23 14:34:38 -07:00
1 parent 2a433a5c8c
commit b9b17d8331
2 files changed
+7 -16

No files matched your search

@@ -51,8 +51,6 @@ public class BlockInfo
private boolean full;
private float shx = 0, shy = 0, shz = 0;
private int cachedTint = -1;
private int cachedMultiplier = -1;
@@ -69,12 +67,9 @@ public class BlockInfo
return cachedMultiplier;
}
@Deprecated
public void updateShift()
{
Vector3d offset = state.getOffset(world, blockPos);
shx = (float) offset.x;
shy = (float) offset.y;
shz = (float) offset.z;
}
public void setWorld(IBlockDisplayReader world)
@@ -96,7 +91,6 @@ public class BlockInfo
this.blockPos = blockPos;
cachedTint = -1;
cachedMultiplier = -1;
shx = shy = shz = 0;
}
public void reset()
@@ -106,7 +100,6 @@ public class BlockInfo
this.blockPos = null;
cachedTint = -1;
cachedMultiplier = -1;
shx = shy = shz = 0;
}
private float combine(int c, int s1, int s2, int s3, boolean t0, boolean t1, boolean t2, boolean t3)
@@ -251,19 +244,22 @@ public class BlockInfo
return full;
}
@Deprecated
public float getShx()
{
return shx;
return 0;
}
@Deprecated
public float getShy()
{
return shy;
return 0;
}
@Deprecated
public float getShz()
{
return shz;
return 0;
}
public int getCachedTint()
@@ -190,10 +190,6 @@ public class VertexLighterFlat extends QuadGatheringTransformer
for(int v = 0; v < 4; v++)
{
position[v][0] += blockInfo.getShx();
position[v][1] += blockInfo.getShy();
position[v][2] += blockInfo.getShz();
float x = position[v][0] - .5f;
float y = position[v][1] - .5f;
float z = position[v][2] - .5f;
@@ -335,7 +331,6 @@ public class VertexLighterFlat extends QuadGatheringTransformer
public void updateBlockInfo()
{
blockInfo.updateShift();
blockInfo.updateFlatLighting();
}
}