Global safety checks for blockstates while chunks are unloading

This commit is contained in:
Vincent Lee committed 2016-01-10 22:53:21 -06:00
1 parent 84204db587
commit f3cce3d24e
54 files changed
+163 -114

No files matched your search

@@ -52,6 +52,10 @@ public class RenderTilePool extends TileEntitySpecialRenderer<TilePool> {
@Override
public void renderTileEntityAt(TilePool pool, double d0, double d1, double d2, float f, int digProgress) {
if (pool != null && pool.getWorld() != null && !pool.getWorld().isBlockLoaded(pool.getPos(), false)) {
return;
}
GlStateManager.pushMatrix();
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
@@ -92,6 +96,8 @@ public class RenderTilePool extends TileEntitySpecialRenderer<TilePool> {
tess.draw();
GlStateManager.enableLighting();
GlStateManager.translate(0.5F, 1.5F, 0.5F);
GlStateManager.color(1, 1, 1, a);
GlStateManager.enableRescaleNormal();