public void AddBlock(VertexWithIndex data, bool bRebuildIfNeeded = false) { if (BlockCount >= TotalSize) { throw new InvalidOperationException("Chunk is full."); } Renderer.AddBlock(data, bRebuildIfNeeded); }
/// <summary> /// Add a single block from the given block data to this chunk. Do not use this when building a chunk, use <see cref='BuildChunk'/> instead. /// </summary> /// <param name="data"></param> /// <param name="rebuildIfNeeded"></param> /// <returns></returns> public void AddBlock(Block data, bool rebuildIfNeeded = false) { if (BlockCount >= TotalSize) { throw new InvalidOperationException("Chunk is full."); } Renderer.AddBlock(data, rebuildIfNeeded); // TODO store the blocks in a more manageable format }