}
public void setLight(int x, int y, int z, byte val)
{
int sindex = toSectionIndex(x >> 4, y >> 4, z >> 4);
Section sec = sections[sindex];
if(sec == null)
return;
int eindex = toElementIndex(x & 0xF, y & 0xF, z & 0xF);
if(mode == Mode.BLOCKLIGHT)
sec.setBlockLight(eindex, val);
else
sec.setSkyLight(eindex, val);
}