public void ChunktoRegionRelative()
{
X = X % 32;
if (X< 0)
X += 32;
Z = Z % 32;
if (Z < 0)
Z += 32;
}
private Bitmap RenderRegionBiomes(RegionFile region, Bitmap b, int offsetX, int offsetY) { foreach (Chunk c in region.Chunks) { if (c == null || c.Root == null) continue; Coord chunkOffset = new Coord(c.Coords); chunkOffset.ChunktoRegionRelative(); chunkOffset.ChunktoAbsolute(); RenderChunkBiomes(c, b, offsetX + chunkOffset.X, offsetY + chunkOffset.Z); } return b; }