Fix forge light pipeline applying block offsets twice (#7323)
This commit is contained in:
parent
2a433a5c8c
commit
b9b17d8331
2 changed files with 7 additions and 16 deletions
|
@ -51,8 +51,6 @@ public class BlockInfo
|
||||||
|
|
||||||
private boolean full;
|
private boolean full;
|
||||||
|
|
||||||
private float shx = 0, shy = 0, shz = 0;
|
|
||||||
|
|
||||||
private int cachedTint = -1;
|
private int cachedTint = -1;
|
||||||
private int cachedMultiplier = -1;
|
private int cachedMultiplier = -1;
|
||||||
|
|
||||||
|
@ -69,12 +67,9 @@ public class BlockInfo
|
||||||
return cachedMultiplier;
|
return cachedMultiplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void updateShift()
|
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)
|
public void setWorld(IBlockDisplayReader world)
|
||||||
|
@ -96,7 +91,6 @@ public class BlockInfo
|
||||||
this.blockPos = blockPos;
|
this.blockPos = blockPos;
|
||||||
cachedTint = -1;
|
cachedTint = -1;
|
||||||
cachedMultiplier = -1;
|
cachedMultiplier = -1;
|
||||||
shx = shy = shz = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reset()
|
public void reset()
|
||||||
|
@ -106,7 +100,6 @@ public class BlockInfo
|
||||||
this.blockPos = null;
|
this.blockPos = null;
|
||||||
cachedTint = -1;
|
cachedTint = -1;
|
||||||
cachedMultiplier = -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)
|
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;
|
return full;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public float getShx()
|
public float getShx()
|
||||||
{
|
{
|
||||||
return shx;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public float getShy()
|
public float getShy()
|
||||||
{
|
{
|
||||||
return shy;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public float getShz()
|
public float getShz()
|
||||||
{
|
{
|
||||||
return shz;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getCachedTint()
|
public int getCachedTint()
|
||||||
|
|
|
@ -190,10 +190,6 @@ public class VertexLighterFlat extends QuadGatheringTransformer
|
||||||
|
|
||||||
for(int v = 0; v < 4; v++)
|
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 x = position[v][0] - .5f;
|
||||||
float y = position[v][1] - .5f;
|
float y = position[v][1] - .5f;
|
||||||
float z = position[v][2] - .5f;
|
float z = position[v][2] - .5f;
|
||||||
|
@ -335,7 +331,6 @@ public class VertexLighterFlat extends QuadGatheringTransformer
|
||||||
|
|
||||||
public void updateBlockInfo()
|
public void updateBlockInfo()
|
||||||
{
|
{
|
||||||
blockInfo.updateShift();
|
|
||||||
blockInfo.updateFlatLighting();
|
blockInfo.updateFlatLighting();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue