Exemplo n.º 1
0
        private BlockEntity ApplyBlockEntity(BlockEntity entity, int X, int Y, int Z)
        {
            if (entity == null)
            {
                return(null);
            }

            if (_access == AccessMode.ParallelWrite)
            {
                var entity2 = entity.InternalClone();
                entity2.AssignCoord(X, Y, Z);
                return(entity2);
            }
            else if (_access == AccessMode.Write)
            {
                entity.AssignCoord(X, Y, Z);
                return(entity);
            }
            else
            {
                throw new AccessViolationException();
            }
        }