コード例 #1
0
  public int sample(int side) {

    if ((sampled & 1 << side) == 0) {
      c.set(pos).offset(side);
      Block block = access.getBlock(c.x, c.y, c.z);
      samples[side] =
          access.getLightBrightnessForSkyBlocks(
              c.x, c.y, c.z, block.getLightValue(access, c.x, c.y, c.z));
      sampled |= 1 << side;
    }
    return samples[side];
  }
コード例 #2
0
  public void locate(IBlockAccess a, int x, int y, int z) {

    access = a;
    pos.set(x, y, z);
    sampled = 0;
  }