public void Render(Vector2I vis_min, Vector2I vis_max, bool forceVisibleRebuild = false) { if (base.enabled) { int layer = LayerMask.NameToLayer("World"); Vector2I vector2I = new Vector2I(vis_min.x / 16, vis_min.y / 16); Vector2I vector2I2 = new Vector2I((vis_max.x + 16 - 1) / 16, (vis_max.y + 16 - 1) / 16); for (int i = vector2I.y; i < vector2I2.y; i++) { for (int j = vector2I.x; j < vector2I2.x; j++) { WorldChunk worldChunk = worldChunks[j, i]; if (dirtyChunks[j, i] || forceVisibleRebuild) { dirtyChunks[j, i] = false; worldChunk.Rebuild(biomeMasks, elementMaterials); } worldChunk.Render(layer); } } RebuildDirtyChunks(); } }