Fix some code holding client world references longer than needed (#4881)

This commit is contained in:
Ben Staddon authored and LexManos committed 2018-04-22 14:40:38 -07:00
1 parent bc545450e5
commit 90bf8dd95d
5 files changed
+38 -8

No files matched your search

@@ -94,6 +94,16 @@ public class BlockInfo
shx = shy = shz = 0;
}
public void reset()
{
this.world = null;
this.state = null;
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)
{
if (c == 0 && !t0) c = Math.max(0, Math.max(s1, s2) - 1);
@@ -122,6 +122,7 @@ public class ForgeBlockModelRenderer extends BlockModelRenderer
}
}
}
lighter.resetBlockInfo();
return !empty;
}
}
@@ -302,6 +302,11 @@ public class VertexLighterFlat extends QuadGatheringTransformer
blockInfo.setBlockPos(blockPos);
}
public void resetBlockInfo()
{
blockInfo.reset();
}
public void updateBlockInfo()
{
blockInfo.updateShift();