Initial Commit

This commit is contained in:
Chicken Bones committed 2013-07-16 17:58:02 +10:00
1 parent 397135f687
commit 0f32dd8620
82 files changed
+10693

No files matched your search

@@ -0,0 +1,28 @@
package codechicken.lib.lighting;
import net.minecraft.world.IBlockAccess;
import codechicken.lib.vec.BlockCoord;
public class LazyLightMatrix
{
private BlockCoord pos = new BlockCoord();
private IBlockAccess access;
private boolean computed = false;
private LightMatrix lightMatrix = new LightMatrix();
public LightMatrix lightMatrix()
{
if(computed)
return lightMatrix;
computed = true;
lightMatrix.computeAt(access, pos.x, pos.y, pos.z);
return lightMatrix;
}
public void setPos(IBlockAccess access, int x, int y, int z)
{
computed = false;
this.access = access;
pos.set(x, y, z);
}
}