public ServerLandscapeManagerBlockChangedEventArgs(IAbstractChunk chunk, ChunkDataProviderDataChangedEventArgs e)
        {
            Count = e.Count;

            Locations = new Vector3I[Count];
            e.Locations.CopyTo(Locations, 0);
            BlockHelper.ConvertToGlobal(chunk.Position, Locations);

            Values = e.Bytes;

            if (e.Tags != null)
            {
                Tags = e.Tags;
            }
        }
Example #2
0
        private void ChangeChunk(IAbstractChunk newChunk)
        {
            if (_currentChunk == newChunk)
            {
                return;
            }

            _currentChunk = newChunk;

            if (_transactionActive)
            {
                if (!_transactionChunks.Contains(_currentChunk))
                {
                    ((InsideDataProvider)_currentChunk.BlockData).BeginTransaction();
                    _transactionChunks.Add(_currentChunk);
                }
            }
        }