/// <summary> Sets the block at the given world coordinates without bounds checking, /// and also recalculates the heightmap for the given (x,z) column. </summary> public void SetBlock(int x, int y, int z, byte blockId) { int index = (y * Length + z) * Width + x; byte oldBlock = blocks[index]; blocks[index] = blockId; UpdateHeight(x, y, z, oldBlock, blockId); WeatherRenderer weather = game.WeatherRenderer; if (weather.heightmap != null && !IsNotLoaded) { weather.UpdateHeight(x, y, z, oldBlock, blockId); } }